Przeglądaj źródła

`模块4:自然灾害与防护包功能模块`

xst 4 lat temu
rodzic
commit
e78a80c710

+ 1 - 1
src/main/java/com/td/boss/game/complayerland/scheduled/ComPlayerDisasterDayTask.java

@@ -27,7 +27,7 @@ public class ComPlayerDisasterDayTask extends QuartzJobBean {
     protected void executeInternal(JobExecutionContext jobExecutionContext) {
     protected void executeInternal(JobExecutionContext jobExecutionContext) {
         log.info("触发灾难周期任务开始");
         log.info("触发灾难周期任务开始");
         long time = System.currentTimeMillis() + RedisData.getDisastersDayTimeout();
         long time = System.currentTimeMillis() + RedisData.getDisastersDayTimeout();
-        String _redisKey = "LOCK:COM_PLAYER_DISASTER:DAY:" + DateUtil.format(new Date(), "yyyyMMd");
+        String _redisKey = "LOCK:COM_PLAYER_DISASTER:DAY:" + DateUtil.format(new Date(), "yyyyMMdd");
 
 
         if (!redisLock.lock(_redisKey, String.valueOf(time))) {
         if (!redisLock.lock(_redisKey, String.valueOf(time))) {
             log.info("触发每天灾难任务加锁失败!");
             log.info("触发每天灾难任务加锁失败!");

+ 1 - 1
src/main/java/com/td/boss/game/complayerland/scheduled/ComPlayerDisasterWeekTask.java

@@ -30,7 +30,7 @@ public class ComPlayerDisasterWeekTask extends QuartzJobBean {
         log.info("每周拉取灾难数据周期任务开始");
         log.info("每周拉取灾难数据周期任务开始");
 
 
         long time = System.currentTimeMillis() + RedisData.getDisastersWeekTimeout();
         long time = System.currentTimeMillis() + RedisData.getDisastersWeekTimeout();
-        String _redisKey = "LOCK:COM_PLAYER_DISASTER:WEEK:" + DateUtil.format(new Date(), "yyyyMMd");
+        String _redisKey = "LOCK:COM_PLAYER_DISASTER:WEEK:" + DateUtil.format(new Date(), "yyyyMMdd");
 
 
         if (!redisLock.lock(_redisKey, String.valueOf(time))) {
         if (!redisLock.lock(_redisKey, String.valueOf(time))) {
             log.info("每周拉取灾难数据周期任务加锁失败!");
             log.info("每周拉取灾难数据周期任务加锁失败!");