Explorar el Código

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

release_toaliyun_real
hupeng hace 7 años
padre
commit
78076f30e9
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  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 Ver fichero

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


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


+ 1
- 0
mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml Ver fichero

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


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


<if test=" null != endTime "> <if test=" null != endTime ">


Cargando…
Cancelar
Guardar