fix
This commit is contained in:
@@ -43,12 +43,12 @@ public class OverdueOrderHandlerTask {
|
||||
}
|
||||
|
||||
/**
|
||||
* 每秒钟检测,判断任务是否到期
|
||||
* 每10秒钟检测,判断任务是否到期
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/8/15 13:47
|
||||
**/
|
||||
@Scheduled(fixedRate = 1000)
|
||||
@Scheduled(fixedRate = 10000)
|
||||
public void processMessages() {
|
||||
long now = System.currentTimeMillis() / 1000;
|
||||
Set<String> messages = stringRedisTemplate.opsForZSet().rangeByScore(QUEUE_KEY, 0, now);
|
||||
@@ -74,7 +74,12 @@ public class OverdueOrderHandlerTask {
|
||||
}
|
||||
// 如果订单未接单,进行退款处理
|
||||
if ("0".equals(orderInfo.getOrderStatus())) {
|
||||
playOrderInfoService.updateStateTo4("2", "admin", orderInfo.getId(), "订单长时间未接单", new ArrayList<>());
|
||||
try {
|
||||
playOrderInfoService.updateStateTo4("2", "admin", orderInfo.getId(), "订单长时间未接单", new ArrayList<>());
|
||||
}catch (Exception e){
|
||||
log.error("订单退款失败", e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user