@@ -2734,9 +2734,9 @@ public class AppAppOrderServiceImpl extends ServiceImpl<AppOrderDao, TbOrder> im
order.setStatus(0);
-// 超时时间10分钟
+// 超时时间15分钟
Date date = new Date();
- long time1 = date.getTime()+10*60*1000;
+ long time1 = date.getTime()+15*60*1000;
order.setTimeOut(time1);
}
// 更新订单
@@ -186,7 +186,8 @@ public class OrderScheduler {
lock.lock();
try {
log.info("超时订单自动取消任务开始运行");
- long time = new Date().getTime();
+ //加5分钟在前端强制取消前执行
+ long time = new Date().getTime()+5*60*1000;
List<TbOrder> orderList = orderService.changeTimeOutOrder(time);
if (orderList.size() == 0) {