消息推送结束时间调整
This commit is contained in:
parent
69f71cc856
commit
93e4a206ac
@ -55,7 +55,9 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
@ -721,9 +723,9 @@ public class ShopMessageTemplateServiceImpl extends BaseServiceImpl<ShopMessageT
|
||||
private Map getActiveTime(){
|
||||
Map args = new HashMap();
|
||||
// 获取当前时间
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
// 加上12小时
|
||||
LocalDateTime futureTime = now.plusHours(12);
|
||||
LocalDateTime now = LocalDateTime.of(LocalDate.now(), LocalTime.of(9,0,0));
|
||||
// 加上13小时30分钟
|
||||
LocalDateTime futureTime = now.plusHours(13).minusMinutes(30);
|
||||
// 格式化输出
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
String formattedNow = now.format(formatter);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user