no message
This commit is contained in:
parent
6920d3d554
commit
7c07a7951c
|
|
@ -264,8 +264,8 @@ public class OrderServiceImpl implements OrderService {
|
|||
}
|
||||
|
||||
public boolean isInTimeRange(LocalTime now) {
|
||||
LocalTime start = LocalTime.of(17, 29, 59); // 17:29:59
|
||||
LocalTime end = LocalTime.of(17, 30, 59); // 17:30:59
|
||||
LocalTime start = LocalTime.of(12, 34, 59); // 17:29:59
|
||||
LocalTime end = LocalTime.of(12, 35, 59); // 17:30:59
|
||||
return !now.isBefore(start) && !now.isAfter(end);
|
||||
}
|
||||
/**
|
||||
|
|
@ -383,6 +383,7 @@ public class OrderServiceImpl implements OrderService {
|
|||
}
|
||||
//TODO: 需要定时
|
||||
LocalTime currentTime = LocalTime.now(); // 当前系统时间
|
||||
log.info("明日订单时间{} 是否小于明日时间{} 是否为17:50{}",tomorrowStart,now.before(tomorrowStart),isInTimeRange(currentTime));
|
||||
if(now.before(tomorrowStart)&&isInTimeRange(currentTime)){
|
||||
log.info("订单[{}]明日订单通知", order.getId());
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue