|
|
|
@@ -509,21 +509,21 @@ |
|
|
|
left join wx_coupon c on c.id = ci.coupon_id |
|
|
|
left join wx_coupon_order co on co.id = ci.id |
|
|
|
where c.type = 100 |
|
|
|
and c.create_date between #{startdate} and #{enddate} |
|
|
|
and co.create_date between #{startdate} and #{enddate} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="findTranCardCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long"> |
|
|
|
select count(distinct wcs.coupon_order_id) from wx_card_info ci |
|
|
|
left join wx_coupon c on c.id = ci.coupon_id |
|
|
|
left join wx_card_transfer_info wcs on wcs.coupon_order_id = ci.id |
|
|
|
where c.type = 100 and c.create_date between #{startdate} and #{enddate} |
|
|
|
where c.type = 100 and wcs.create_date between #{startdate} and #{enddate} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="findSubsidyMoney" parameterType="com.iformall.domain.po.WxCoupon" resultType="String"> |
|
|
|
select sum(round(sc.subsidy/100,2)) from wx_card_info ci |
|
|
|
left join wx_coupon c on c.id = ci.coupon_id |
|
|
|
left join wx_merchant_subsidy sc on sc.coupon_order_id = ci.id |
|
|
|
where c.type = 100 and c.create_date between #{startdate} and #{enddate} |
|
|
|
where c.type = 100 and sc.create_date between #{startdate} and #{enddate} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="findCountData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap"> |
|
|
|
@@ -692,7 +692,7 @@ |
|
|
|
left join wx_coupon_order wo on wo.coupon_id = c.id |
|
|
|
left join wx_merchant_subsidy sc on sc.coupon_order_id = wo.id |
|
|
|
where c.type not in(8,9,100) and wo.coupon_order_status = 1 |
|
|
|
and c.create_date between #{startdate} and #{enddate} |
|
|
|
and sc.create_date between #{startdate} and #{enddate} |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
@@ -760,7 +760,7 @@ |
|
|
|
left join wx_coupon c on c.id = ci.coupon_id |
|
|
|
left join wx_coupon_order co on co.id = ci.id |
|
|
|
where c.type = 100 |
|
|
|
and c.create_date between #{startdate} and #{enddate} |
|
|
|
and co.create_date between #{startdate} and #{enddate} |
|
|
|
group by xtime |
|
|
|
</select> |
|
|
|
|
|
|
|
|