|
|
|
@@ -666,8 +666,8 @@ |
|
|
|
select DATE_FORMAT(ci.create_date,'%Y-%m-%d') xtime,sum(ci.sale_amount) sale_amount from wx_card_info ci |
|
|
|
left join wx_coupon c on c.id = ci.coupon_id |
|
|
|
where ci.create_date between #{startdate} and #{enddate} |
|
|
|
<if test="title != null"> |
|
|
|
and c.title like concat('%', #{title},'%') |
|
|
|
<if test="id != null"> |
|
|
|
and c.id = #{id} |
|
|
|
</if> |
|
|
|
group by xtime |
|
|
|
</select> |
|
|
|
@@ -677,8 +677,8 @@ |
|
|
|
left join wx_coupon c on c.id = ci.coupon_id |
|
|
|
left join wx_card_spend wcs on wcs.card_id = ci.id |
|
|
|
where ci.create_date between #{startdate} and #{enddate} |
|
|
|
<if test="title != null"> |
|
|
|
and c.title like concat('%', #{title},'%') |
|
|
|
<if test="id != null"> |
|
|
|
and c.id = #{id} |
|
|
|
</if> |
|
|
|
group by xtime |
|
|
|
</select> |
|
|
|
@@ -689,8 +689,8 @@ |
|
|
|
left join wx_coupon c on c.id = ci.coupon_id |
|
|
|
left join wx_coupon_order co on co.id = ci.id |
|
|
|
where c.create_date between #{startdate} and #{enddate} |
|
|
|
<if test="title != null"> |
|
|
|
and c.title like concat('%', #{title},'%') |
|
|
|
<if test="id != null"> |
|
|
|
and c.id = #{id} |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
@@ -699,16 +699,16 @@ |
|
|
|
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.create_date between #{startdate} and #{enddate} |
|
|
|
<if test="title != null"> |
|
|
|
and c.title like concat('%', #{title},'%') |
|
|
|
<if test="id != null"> |
|
|
|
and c.id = #{id} |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="findSubsidyMoney" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long"> |
|
|
|
select sum(subsidy_num) from wx_coupon c |
|
|
|
where c.create_date between #{startdate} and #{enddate} |
|
|
|
<if test="title != null"> |
|
|
|
and c.title like concat('%', #{title},'%') |
|
|
|
<if test="id != null"> |
|
|
|
and c.id = #{id} |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
@@ -727,8 +727,8 @@ |
|
|
|
left join wx_card_spend wcs on wcs.card_id = ci.id |
|
|
|
where wc.id = c.id) as sum_payment |
|
|
|
from wx_coupon c where 1=1 |
|
|
|
<if test=" null != title "> |
|
|
|
and c.title like concat('%', #{title},'%') |
|
|
|
<if test="id != null"> |
|
|
|
and c.id = #{id} |
|
|
|
</if> |
|
|
|
order by status asc,create_date desc |
|
|
|
</select> |
|
|
|
@@ -742,8 +742,8 @@ |
|
|
|
<if test=" null != type "> |
|
|
|
and c.type = #{type} |
|
|
|
</if> |
|
|
|
<if test=" null != title "> |
|
|
|
and c.title like concat('%', #{title},'%') |
|
|
|
<if test="id != null"> |
|
|
|
and c.id = #{id} |
|
|
|
</if> |
|
|
|
order by status asc,create_date desc |
|
|
|
</select> |
|
|
|
@@ -751,8 +751,8 @@ |
|
|
|
<select id="findCouponSendCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long"> |
|
|
|
select sum(subsidy_num) from wx_coupon c |
|
|
|
where c.create_date between #{startdate} and #{enddate} |
|
|
|
<if test="title != null"> |
|
|
|
and c.title like concat('%', #{title},'%') |
|
|
|
<if test="id != null"> |
|
|
|
and c.id = #{id} |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
</mapper> |