统计篮球订单收益
This commit is contained in:
@@ -336,4 +336,31 @@
|
||||
order by t.order_start desc
|
||||
</select>
|
||||
|
||||
<select id="orderPageSum" resultType="java.math.BigDecimal">
|
||||
select
|
||||
sum((select IFNULL(sum(ot.price),0) from sv_order ot
|
||||
where ot.member_id = t.member_id and (ot.order_sn = t.order_sn or ot.order_sn = t.order_add_sn)
|
||||
) - IFNULL(t.sum_pay_money,0)) orderSumMoney
|
||||
from sv_barcode_order_time t
|
||||
where 1=1
|
||||
<if test="state != null and state == 2">
|
||||
AND (t.status = 1 or t.paying = #{state})
|
||||
</if>
|
||||
<if test="state != null and state == 1">
|
||||
AND t.paying = #{state}
|
||||
</if>
|
||||
<if test="state != null and state == 0">
|
||||
AND t.paying = #{state} and t.status = 0
|
||||
</if>
|
||||
<if test="orderSn != ''">
|
||||
AND t.order_sn = #{orderSn}
|
||||
</if>
|
||||
<if test="starTime != ''">
|
||||
AND t.order_start >= #{starTime}
|
||||
</if>
|
||||
<if test="endTime != ''">
|
||||
AND t.order_start <= #{endTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user