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

[BUG][1000915]:解决商户禁用后券不能下架问题

release_toaliyun_real
hupeng 7 лет назад
Родитель
Сommit
39beb5abd7
4 измененных файлов: 18 добавлений и 4 удалений
  1. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java
  2. +5
    -1
      mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml
  3. +5
    -1
      mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml
  4. +7
    -2
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Просмотреть файл

@@ -247,6 +247,7 @@ public class WxMerchantServiceImpl implements WxMerchantService {
couponIds.stream().filter(cid->!isCouponMerchantValid(cid)).forEach(cid->{
WxCoupon wxCoupon = new WxCoupon();
wxCoupon.setId(cid);
wxCoupon.setTenantId(wxMerchant.getTenantId());
wxCoupon.setStatus(EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode());
wxCouponService.saveOrUpdate(wxCoupon);
});


+ 5
- 1
mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml Просмотреть файл

@@ -97,7 +97,11 @@
</select>

<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>

<sql id="CouponChannelVoColumns">


+ 5
- 1
mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml Просмотреть файл

@@ -89,7 +89,11 @@
</select>

<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 id="offExpiriedCouponSendByCouponStatus">


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

@@ -173,8 +173,13 @@
</sql>

<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">



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