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

[卡券][修复]:限时抢购定时任务执行时间

release_toaliyun_real
hupeng 7 лет назад
Родитель
Сommit
78076f30e9
2 измененных файлов: 2 добавлений и 2 удалений
  1. +1
    -2
      mallinkAdmin/src/main/java/com/iformall/schedule/CouponExpiringSchedule.java
  2. +1
    -0
      mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml

+ 1
- 2
mallinkAdmin/src/main/java/com/iformall/schedule/CouponExpiringSchedule.java Просмотреть файл

@@ -24,7 +24,6 @@ public class CouponExpiringSchedule {

@Scheduled(cron = "0 5 0 * * ?") // 每天凌晨00:05
//@Scheduled(cron = "*/10 * * * * ?") // 测试10秒中一次
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class})
public void couponExpiringSchedule() {
wxCouponMapper.offExpiriedCouponByValidDate();
}
@@ -38,7 +37,7 @@ public class CouponExpiringSchedule {
wxCouponChannelMapper.offExpiriedCouponChannelByCouponStatus();
}

@Scheduled(cron = "0 0 0/1 * * ?") // 每小时(整点)执行//限时抢购
@Scheduled(cron = "0 0,1,2,3 0/1 * * ?") // 每小时 0, 1 ,2 ,3 分钟(整点)执行//限时抢购
//@Scheduled(cron = "*/10 * * * * ?") // 测试10秒中一次
public void couponChannel2ExpiringSchedule() {
wxCouponChannelMapper.offExpiriedCouponChannel2ByEndTime();


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

@@ -177,6 +177,7 @@

<if test=" null != targetAd and 2 == targetAd">
and `begin_time` &lt; now()
and `end_time` &gt; now()
</if>

<if test=" null != endTime ">


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