|
|
@@ -482,7 +482,13 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
// 解析原始时间
|
|
|
LocalDateTime dateTime = LocalDateTime.parse(repeatStartEndTime.getCoverageEndDate(), formatter);
|
|
|
- LocalDateTime tomorrowMidnight = dateTime.toLocalDate().plusDays(1).atStartOfDay();
|
|
|
+ LocalDateTime tomorrowMidnight = dateTime;
|
|
|
+ //判断是否是整点 如果是整点则不进行明天的零点操作
|
|
|
+ if(dateTime.getHour() != 0 || dateTime.getMinute() != 0 || dateTime.getSecond() != 0)
|
|
|
+ {
|
|
|
+ tomorrowMidnight = dateTime.toLocalDate().plusDays(1).atStartOfDay();
|
|
|
+ }
|
|
|
+
|
|
|
timeEntity.setCoverageEndDate(tomorrowMidnight.format(formatter));
|
|
|
LocalDateTime end = tomorrowMidnight.plusYears(1L);
|
|
|
timeEntity.setNewStartDate(DateTimeUtil.format(tomorrowMidnight, DateTimeUtil.DATETIME_PATTERN));
|