| @@ -247,6 +247,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| couponIds.stream().filter(cid->!isCouponMerchantValid(cid)).forEach(cid->{ | couponIds.stream().filter(cid->!isCouponMerchantValid(cid)).forEach(cid->{ | ||||
| WxCoupon wxCoupon = new WxCoupon(); | WxCoupon wxCoupon = new WxCoupon(); | ||||
| wxCoupon.setId(cid); | wxCoupon.setId(cid); | ||||
| wxCoupon.setTenantId(wxMerchant.getTenantId()); | |||||
| wxCoupon.setStatus(EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode()); | wxCoupon.setStatus(EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode()); | ||||
| wxCouponService.saveOrUpdate(wxCoupon); | wxCouponService.saveOrUpdate(wxCoupon); | ||||
| }); | }); | ||||
| @@ -97,7 +97,11 @@ | |||||
| </select> | </select> | ||||
| <update id="updateStatusByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel"> | <update id="updateStatusByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel"> | ||||
| update wx_coupon_channel set status=#{status} where tenant_id=#{tenantId} and coupon_id=#{couponId} | |||||
| update wx_coupon_channel set status=#{status} | |||||
| where coupon_id=#{couponId} | |||||
| <if test=" null != tenantId "> | |||||
| and tenant_id = #{tenantId} | |||||
| </if> | |||||
| </update> | </update> | ||||
| <sql id="CouponChannelVoColumns"> | <sql id="CouponChannelVoColumns"> | ||||
| @@ -89,7 +89,11 @@ | |||||
| </select> | </select> | ||||
| <update id="updateStatusByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel"> | <update id="updateStatusByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel"> | ||||
| update wx_coupon_send set status=#{status} where tenant_id=#{tenantId} and coupon_id=#{couponId} | |||||
| update wx_coupon_send set status=#{status} | |||||
| where coupon_id=#{couponId} | |||||
| <if test=" null != tenantId "> | |||||
| and tenant_id = #{tenantId} | |||||
| </if> | |||||
| </update> | </update> | ||||
| <update id="offExpiriedCouponSendByCouponStatus"> | <update id="offExpiriedCouponSendByCouponStatus"> | ||||
| @@ -173,8 +173,13 @@ | |||||
| </sql> | </sql> | ||||
| <update id="updateStatusByPressCouponId" parameterType="com.iformall.domain.po.WxOrder"> | <update id="updateStatusByPressCouponId" parameterType="com.iformall.domain.po.WxOrder"> | ||||
| update wx_order set order_status=#{orderStatus} where tenant_id=#{tenantId} and product_id=#{productId} and press_end_date is not null | |||||
| </update> | |||||
| update wx_order set order_status=#{orderStatus} | |||||
| where product_id=#{productId} | |||||
| and press_end_date is not null | |||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| </update> | |||||
| <resultMap id="CVoResultMap" type="com.iformall.domain.vo.WxOrderCouponVo"> | <resultMap id="CVoResultMap" type="com.iformall.domain.vo.WxOrderCouponVo"> | ||||