xiaohanzi 5 лет назад
Родитель
Сommit
201d9d1fe3
3 измененных файлов: 9 добавлений и 0 удалений
  1. +2
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxCouponChannelMapper.java
  2. +3
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  3. +4
    -0
      mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml

+ 2
- 0
mallinkService/src/main/java/com/iformall/mapper/WxCouponChannelMapper.java Просмотреть файл

@@ -40,4 +40,6 @@ public interface WxCouponChannelMapper extends CommonMapper<WxCouponChannel, Str
void delByTopic(WxTopic wxTopic);

List<WxCouponChannel> findQrcodeEmptyList();
void cardDefer(@Param("couponId")Long couponId,@Param("endTime")Date endTime);
}

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

@@ -761,6 +761,9 @@ public class WxCouponServiceImpl implements WxCouponService {
coupon.setUpdateDate(new Date());
wxCouponMapper.updateValidEndDate(coupon);
//更新coupon_channel
wxCouponChannelMapper.cardDefer(id, validEndDate);
//更新coupon_order的状态,已过期的变为使用中 5-->4
wxCouponOrderMapper.cardDefer(id,validEndDate);


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

@@ -394,6 +394,10 @@
<select id="findQrcodeEmptyList" resultType="com.iformall.domain.po.WxCouponChannel">
select * from wx_coupon_channel where qr_code is null
</select>
<update id="cardDefer">
update wx_coupon_channel set end_time = #{endTime} where coupon_id = #{couponId} and target_ad = 5 and type = 100
</update>


</mapper>

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