Commit 3f325433 authored by liwenbin's avatar liwenbin

fix

parent b3d1d9a1
......@@ -57,8 +57,10 @@ public class RetryController {
@Async
@RequestMapping("/repeat_db_distribute")
public void repeatDBAudit() {
String lockKey = "ASSET_DISTRIBUTION:REPEAT_DB_ATTRIBUTE:@88JMS";
try {
boolean b = redisService.setIfAbsent("ASSET_DISTRIBUTION:REPEAT_DB_ATTRIBUTE:99AMU", "1", 1, TimeUnit.DAYS);
log.info("数据库资产分发失败订单重新分发开始");
boolean b = redisService.setIfAbsent(lockKey, "1", 1, TimeUnit.DAYS);
if (!b) { return; }
String startTime = DateUtil.getStrFormatDate("yyyy-MM-dd HH:mm:ss", -7);
String endTime = DateUtil.timestamp2Str(System.currentTimeMillis() + "", "yyyy-MM-dd HH:mm:ss");
......@@ -74,11 +76,11 @@ public class RetryController {
i = -1;
}
}
// 删除锁
redisService.del("RULE_ENGINE:REPEAT_DB_AUDIT:88C1K");
log.info("数据库审核失败订单重审完成!");
log.info("数据库资产分发失败订单重新分发完成!");
} catch (Exception e) {
log.error("重复审核数据库失败订单任务出现异常!", e);
log.error("数据库资产分发失败订单重新分发出现异常!", e);
} finally {
redisService.del(lockKey);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment