|
|
@@ -201,7 +201,8 @@
|
|
|
count(id) as totalNumOfOrder,
|
|
|
cast(ifnull(sum(money),0)/100 as decimal(11,2)) as totalOrderAmount,
|
|
|
count(if(status = 'refund',1,NULL)) as totalNumOfRefundOrder,
|
|
|
- cast(sum(ifnull(refund_money,0))/100 as decimal(11,2)) as totalRefundAmount
|
|
|
+ cast(sum(ifnull(refund_money,0))/100 as decimal(11,2)) as totalRefundAmount,
|
|
|
+ cast(sum(ifnull(refund_balance,0))/100 as decimal(11,2)) as totalRefundBalance
|
|
|
from `order_don` where status not in
|
|
|
<foreach collection="noOrderStatus" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
@@ -641,4 +642,16 @@
|
|
|
<select id="getSumMoneyZfbThisMonth" resultType="java.math.BigDecimal">
|
|
|
select ifnull(sum(money) - sum(ifnull(refund_money,0)),0) from order_don where shop_id = #{shopId} and status not in ('close','noPayment') and created_time between #{start} and #{end}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getTotalRefundBalanceTime" resultType="java.math.BigDecimal">
|
|
|
+ select cast(ifnull(sum(ifnull(refund_balance,0)),0)/100 as decimal(11,2))
|
|
|
+ from refund_order_don
|
|
|
+ where (refund_method in ('balance','bxj') or is_clear_balance = 1)
|
|
|
+ <if test="startDate != null">
|
|
|
+ and created_time >= #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">
|
|
|
+ and created_time < #{endDate}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|