|
|
|
@@ -713,16 +713,24 @@ |
|
|
|
where status = 0 and tenant_id =#{tenantId} and valid_type = 1 and valid_end_date < now() |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="offExpiriedCouponByMerchantStatus" parameterType="String"> |
|
|
|
<update id="offExpiriedCouponByMerchantStatus" parameterType="HashMap"> |
|
|
|
update wx_coupon c |
|
|
|
SET c.status = 1, c.update_date = now() |
|
|
|
where c.status = 0 and c.tenant_id =#{tenantId} and |
|
|
|
(select count(*) from wx_coupon_merchant cm, wx_merchant m |
|
|
|
where c.status = 0 and c.tenant_id =#{tenantId} |
|
|
|
<if test=" null != validIds "> |
|
|
|
and c.id not in |
|
|
|
<foreach collection="validIds" index="index" item="idItem" open="(" separator="," close=")"> |
|
|
|
#{idItem} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
</update> |
|
|
|
|
|
|
|
<select id="getValidMerchantProductIds" resultType="Long"> |
|
|
|
select cm.product_id from wx_coupon_merchant cm, wx_merchant m |
|
|
|
where m.id = cm.merchant_id |
|
|
|
and c.id = cm.product_id |
|
|
|
and cm.status = 0 |
|
|
|
and m.status = 1) = 0 |
|
|
|
</update> |
|
|
|
and m.status = 1 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="findSaleMoneyByDate" |
|
|
|
resultType="com.iformall.domain.vo.WxCouponStatisVo"> |
|
|
|
|