| @@ -746,8 +746,8 @@ | |||||
| where wc.id = c.id) as sum_subsidy | where wc.id = c.id) as sum_subsidy | ||||
| from wx_coupon c where c.type = 100 | from wx_coupon c where c.type = 100 | ||||
| <if test="id != null"> | |||||
| and c.id = #{id} | |||||
| <if test="title != null"> | |||||
| and c.title = concat('%', #{title},'%') | |||||
| </if> | </if> | ||||
| order by c.status asc,c.create_date desc | order by c.status asc,c.create_date desc | ||||
| </select> | </select> | ||||
| @@ -769,8 +769,8 @@ | |||||
| <if test=" 2 == type "> | <if test=" 2 == type "> | ||||
| and c.sale_price = 0 | and c.sale_price = 0 | ||||
| </if> | </if> | ||||
| <if test="id != null"> | |||||
| and c.id = #{id} | |||||
| <if test="title != null"> | |||||
| and c.title = concat('%', #{title},'%') | |||||
| </if> | </if> | ||||
| order by c.status asc,c.create_date desc | order by c.status asc,c.create_date desc | ||||
| </select> | </select> | ||||
| @@ -804,8 +804,8 @@ | |||||
| *100,2) as payment_rate | *100,2) as payment_rate | ||||
| from wx_coupon c where c.type = 8 | from wx_coupon c where c.type = 8 | ||||
| <if test="id != null"> | |||||
| and c.id = #{id} | |||||
| <if test="title != null"> | |||||
| and c.title = concat('%', #{title},'%') | |||||
| </if> | </if> | ||||
| order by c.status asc,c.create_date desc | order by c.status asc,c.create_date desc | ||||
| </select> | </select> | ||||
| @@ -840,7 +840,7 @@ | |||||
| select DATE_FORMAT(wco.create_date,'%Y-%m-%d') xtime,count(wco.id) xcount from wx_coupon c,wx_coupon_order wco | select DATE_FORMAT(wco.create_date,'%Y-%m-%d') xtime,count(wco.id) xcount from wx_coupon c,wx_coupon_order wco | ||||
| where c.type not in(8,9,100) | where c.type not in(8,9,100) | ||||
| and wco.coupon_id = c.id and wco.coupon_order_status = 1 | and wco.coupon_id = c.id and wco.coupon_order_status = 1 | ||||
| and wco.create_date between #{startdate} and #{enddate} | |||||
| and wco.update_date between #{startdate} and #{enddate} | |||||
| group by xtime | group by xtime | ||||
| </select> | </select> | ||||
| @@ -856,7 +856,7 @@ | |||||
| select DATE_FORMAT(wco.create_date,'%Y-%m-%d') xtime,count(wco.id) xcount from wx_coupon c,wx_coupon_order wco | select DATE_FORMAT(wco.create_date,'%Y-%m-%d') xtime,count(wco.id) xcount from wx_coupon c,wx_coupon_order wco | ||||
| where c.type not in(8,9,100) | where c.type not in(8,9,100) | ||||
| and wco.coupon_id = c.id and wco.coupon_order_status = 1 and wco.coupon_price > 0 | and wco.coupon_id = c.id and wco.coupon_order_status = 1 and wco.coupon_price > 0 | ||||
| and wco.create_date between #{startdate} and #{enddate} | |||||
| and wco.update_date between #{startdate} and #{enddate} | |||||
| group by xtime | group by xtime | ||||
| </select> | </select> | ||||
| @@ -869,7 +869,7 @@ | |||||
| <select id="findSumPricePayMent" parameterType="com.iformall.domain.po.WxCoupon" resultType="String"> | <select id="findSumPricePayMent" parameterType="com.iformall.domain.po.WxCoupon" resultType="String"> | ||||
| select sum(round(c.sale_price/100,2)) from wx_coupon c,wx_coupon_order wco | select sum(round(c.sale_price/100,2)) from wx_coupon c,wx_coupon_order wco | ||||
| where wco.coupon_id = c.id and wco.coupon_price > 0 and wco.coupon_order_status = 1 | where wco.coupon_id = c.id and wco.coupon_price > 0 and wco.coupon_order_status = 1 | ||||
| and wco.create_date between #{startdate} and #{enddate} | |||||
| and wco.update_date between #{startdate} and #{enddate} | |||||
| </select> | </select> | ||||
| <select id="findSumSubsidyMoney" parameterType="com.iformall.domain.po.WxCoupon" resultType="String"> | <select id="findSumSubsidyMoney" parameterType="com.iformall.domain.po.WxCoupon" resultType="String"> | ||||