mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
禅道问题修复:站内信模版/消息、日志管理、组织权限使用时间区间查询当日数据失效修复
This commit is contained in:
+16
@@ -1,6 +1,7 @@
|
||||
package com.cf.imes.framework.common.util.date;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.LocalDate;
|
||||
@@ -132,4 +133,19 @@ public class LocalDateTimeUtils {
|
||||
return LocalDateTimeUtil.between(dateTime, LocalDateTime.now(), ChronoUnit.DAYS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成起时间0点和止时间12点的区间
|
||||
*
|
||||
* @param dateSection
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime[] generateTimeSection(LocalDateTime[] dateSection) {
|
||||
if (ObjectUtil.isNotNull(dateSection) && dateSection.length == 2) {
|
||||
LocalDateTime[] result = new LocalDateTime[2];
|
||||
result[0] = dateSection[0].withHour(0).withMinute(0).withSecond(0);
|
||||
result[1] = dateSection[1].withHour(23).withMinute(59).withSecond(59);
|
||||
return result;
|
||||
}
|
||||
return dateSection;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user