Просмотр исходного кода

[营销分析][添加][卡营销列表]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
d5b815af43
1 измененных файлов: 2 добавлений и 14 удалений
  1. +2
    -14
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml

+ 2
- 14
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Просмотреть файл

@@ -669,9 +669,6 @@
select DATE_FORMAT(ci.create_date,'%Y-%m-%d') xtime,sum(ci.sale_amount) xcount 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="id != null">
and c.id = #{id}
</if>
group by xtime
</select>

@@ -680,21 +677,15 @@
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="id != null">
and c.id = #{id}
</if>
group by xtime
</select>

<select id="findSaleCardCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long">
select count(distinct co.owner_id)
select count(co.id)
from wx_card_info ci
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="id != null">
and c.id = #{id}
</if>
</select>

<select id="findTranCardCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long">
@@ -702,9 +693,6 @@
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="id != null">
and c.id = #{id}
</if>
</select>

<select id="findSubsidyMoney" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long">
@@ -738,7 +726,7 @@

<select id="findCouponData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap">
select c.*,
(select count(distinct wco.owner_id) from wx_coupon_order wco where wco.coupon_id = c.id) as sale_count,
(select count(distinct wco.id) from wx_coupon_order wco where wco.coupon_id = c.id) as sale_count,
(select count(distinct 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 payment_count,
(select count(distinct 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
from wx_coupon c where 1=1


Загрузка…
Отмена
Сохранить