|
@@ -249,7 +249,7 @@
|
|
<select id="findByPayShopID" resultType="java.lang.Double">
|
|
<select id="findByPayShopID" resultType="java.lang.Double">
|
|
SELECT SUM(cpsr.payAmount)
|
|
SELECT SUM(cpsr.payAmount)
|
|
FROM cm_pay_shop cps
|
|
FROM cm_pay_shop cps
|
|
- LEFT JOIN cm_pay_shop_record cpsr ON cpsr.payShopID = cps.id
|
|
|
|
|
|
+ LEFT JOIN cm_pay_shop_record cpsr ON cpsr.payShopID = cps.id
|
|
WHERE cpsr.delFlag = 0
|
|
WHERE cpsr.delFlag = 0
|
|
AND cps.delFlag = 0
|
|
AND cps.delFlag = 0
|
|
AND cpsr.shopOrderId = #{shopOrderID}
|
|
AND cpsr.shopOrderId = #{shopOrderID}
|
|
@@ -909,7 +909,8 @@
|
|
s.name AS shopName,
|
|
s.name AS shopName,
|
|
c.name AS clubName,
|
|
c.name AS clubName,
|
|
cdr.payWay AS payWay,
|
|
cdr.payWay AS payWay,
|
|
- (select sum((num+presentNum)*cmCostPrice) from cm_order_product where shopOrderId = a.shopOrderId) as allServeAmount
|
|
|
|
|
|
+ (select sum((num+presentNum)*cmCostPrice) from cm_order_product where shopOrderId = a.shopOrderId) as
|
|
|
|
+ allServeAmount
|
|
from cm_shop_order a
|
|
from cm_shop_order a
|
|
left join cm_pay_shop_record cpsr on a.shopOrderID = cpsr.shopOrderID
|
|
left join cm_pay_shop_record cpsr on a.shopOrderID = cpsr.shopOrderID
|
|
left join bp_order_userinfo bou on bou.orderId = a.orderID
|
|
left join bp_order_userinfo bou on bou.orderId = a.orderID
|
|
@@ -1024,7 +1025,8 @@
|
|
co.promotionFullReduction,
|
|
co.promotionFullReduction,
|
|
bou.name AS buyer,
|
|
bou.name AS buyer,
|
|
s.name AS shopName,
|
|
s.name AS shopName,
|
|
- (select sum((num+presentNum)*cmCostPrice) from cm_order_product where shopOrderId = a.shopOrderId) as allServeAmount
|
|
|
|
|
|
+ (select sum((num+presentNum)*cmCostPrice) from cm_order_product where shopOrderId = a.shopOrderId) as
|
|
|
|
+ allServeAmount
|
|
from cm_shop_order a
|
|
from cm_shop_order a
|
|
left join cm_pay_shop_record cpsr on a.shopOrderID = cpsr.shopOrderID
|
|
left join cm_pay_shop_record cpsr on a.shopOrderID = cpsr.shopOrderID
|
|
left join bp_order_userinfo bou on bou.orderId = a.orderID
|
|
left join bp_order_userinfo bou on bou.orderId = a.orderID
|
|
@@ -2455,13 +2457,13 @@
|
|
<if test="sendOutStatus != null and sendOutStatus != ''">
|
|
<if test="sendOutStatus != null and sendOutStatus != ''">
|
|
AND cso.sendOutStatus = #{sendOutStatus}
|
|
AND cso.sendOutStatus = #{sendOutStatus}
|
|
</if>
|
|
</if>
|
|
- <if test="payStatus != null and payStatus != ''">
|
|
|
|
|
|
+ <if test="payStatus != null and payStatus != ''">
|
|
AND cso.payStatus = #{payStatus}
|
|
AND cso.payStatus = #{payStatus}
|
|
</if>
|
|
</if>
|
|
- <if test="refundStatus != null and refundStatus != ''">
|
|
|
|
|
|
+ <if test="refundStatus != null and refundStatus != ''">
|
|
AND cso.refundStatus = #{refundStatus}
|
|
AND cso.refundStatus = #{refundStatus}
|
|
</if>
|
|
</if>
|
|
- <if test="orderType != null and orderType != ''">
|
|
|
|
|
|
+ <if test="orderType != null">
|
|
AND cso.orderType = #{orderType}
|
|
AND cso.orderType = #{orderType}
|
|
</if>
|
|
</if>
|
|
<if test="spID != null and spID != ''">
|
|
<if test="spID != null and spID != ''">
|
|
@@ -2791,7 +2793,7 @@
|
|
|
|
|
|
<update id="updateStatus">
|
|
<update id="updateStatus">
|
|
UPDATE cm_shop_order
|
|
UPDATE cm_shop_order
|
|
- SET shopStatus = #{status},
|
|
|
|
|
|
+ SET shopStatus = #{status},
|
|
closeTime = NOW(),
|
|
closeTime = NOW(),
|
|
closeReason = #{closeReason}
|
|
closeReason = #{closeReason}
|
|
WHERE shopOrderID = #{shopOrderID}
|
|
WHERE shopOrderID = #{shopOrderID}
|