| @@ -713,11 +713,10 @@ | |||||
| </select> | </select> | ||||
| <select id="findSubsidyMoney" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long"> | <select id="findSubsidyMoney" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long"> | ||||
| select sum(subsidy_num) from wx_coupon c | |||||
| select sum(sc.subsidy) 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 c.create_date between #{startdate} and #{enddate} | ||||
| <if test="id != null"> | |||||
| and c.id = #{id} | |||||
| </if> | |||||
| </select> | </select> | ||||
| <select id="findCountData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap"> | <select id="findCountData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap"> | ||||
| @@ -872,9 +871,10 @@ | |||||
| </select> | </select> | ||||
| <select id="findSumSubsidyMoney" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long"> | <select id="findSumSubsidyMoney" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long"> | ||||
| select sum(c.subsidy_num) from wx_coupon c,wx_coupon_order wco | |||||
| where wco.coupon_id = c.id | |||||
| and wco.create_date between #{startdate} and #{enddate} | |||||
| select sum(sc.subsidy) from wx_coupon c | |||||
| 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 c.create_date between #{startdate} and #{enddate} | |||||
| </select> | </select> | ||||