|
|
|
@@ -49,6 +49,30 @@ |
|
|
|
GROUP BY pay_type |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryShopPayOrderSum" parameterType="com.iformall.domain.po.NeuPosOrderMasterExt" resultType="java.util.Map"> |
|
|
|
select ifnull(sum(order_amount),0) as payAmount, |
|
|
|
ifnull(sum(discount_amount),0) as discountAmount, |
|
|
|
count(order_amount) as payCount, |
|
|
|
ifnull(sum(if(order_status=4,real_pay_amount,0)),0) refundAmount, |
|
|
|
count(if(order_status=4,true,null)) refundCount, |
|
|
|
ifnull(sum(if(order_status=2,real_pay_amount,0)),0) as amount, |
|
|
|
pay_type as payType |
|
|
|
from order_master |
|
|
|
where pay_status = 2 and order_type != '3' |
|
|
|
<if test=" orgId != null"> |
|
|
|
and org_id = #{orgId} |
|
|
|
</if> |
|
|
|
<if test=" shopId != null"> |
|
|
|
and shop_id = #{shopId} |
|
|
|
</if> |
|
|
|
<if test=" createBegin != null"> |
|
|
|
and created_at >= #{createBegin} |
|
|
|
</if> |
|
|
|
<if test=" createEnd != null"> |
|
|
|
and created_at <= #{createEnd} |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectShopList" parameterType="Integer" resultType="java.util.Map"> |
|
|
|
select id,name from `shop` where status = 1 |
|
|
|
<if test=" orgId != null"> |
|
|
|
|