|
|
|
@@ -606,34 +606,6 @@ |
|
|
|
<if test=" null != sortColumns">order by ${sortColumns}</if> |
|
|
|
<if test=" null == sortColumns">order by c.status asc,c.create_date desc</if> |
|
|
|
</select> |
|
|
|
<!-- |
|
|
|
<select id="findCouponData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap"> |
|
|
|
select c.*, |
|
|
|
(select count(wco.id) from wx_coupon_order wco where wco.coupon_id = c.id) as sale_count, |
|
|
|
(select count(wco.id) from wx_coupon wc,wx_coupon_order wco where wco.coupon_id = wc.id and wco.coupon_order_status = 1 and wc.id = c.id) as sum_payment, |
|
|
|
(select count(wco.id) from wx_coupon wc,wx_coupon_order wco where wco.coupon_id = wc.id and wco.coupon_order_status = 3 and wc.id = c.id) as backpay_count, |
|
|
|
(select sum(sc.subsidy) from wx_coupon wc |
|
|
|
left join wx_coupon_order wo on wo.coupon_id = wc.id |
|
|
|
left join wx_merchant_subsidy sc on sc.coupon_order_id = wo.id |
|
|
|
where wc.id = c.id) as sum_subsidy |
|
|
|
|
|
|
|
from wx_coupon c where c.type not in(8,9,100) |
|
|
|
<if test=" 1 == type "> |
|
|
|
and c.sale_price > 0 |
|
|
|
</if> |
|
|
|
<if test=" 2 == type "> |
|
|
|
and c.sale_price = 0 |
|
|
|
</if> |
|
|
|
<if test="title != null and title != ''"> |
|
|
|
and c.title like concat('%', #{title},'%') |
|
|
|
</if> |
|
|
|
<if test="id != null"> |
|
|
|
and c.id = #{id} |
|
|
|
</if> |
|
|
|
<if test=" null != sortColumns"> order by ${sortColumns} </if> |
|
|
|
<if test=" null == sortColumns">order by c.status asc,c.create_date desc</if> |
|
|
|
|
|
|
|
</select>--> |
|
|
|
|
|
|
|
<select id="findPressData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap"> |
|
|
|
select c.*, |
|
|
|
|