mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-14 05:33:42 +08:00
更新AopLogQueryDto中的时间字段类型为OffsetDateTime,优化AopLogRepository中的时间范围查询逻辑,调整前端模拟数据生成器以支持新的时间格式,修复日期选择器样式,优化日志管理页面的用户体验。
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.zl.mjga.dto.aoplog;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.OffsetDateTime;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -30,10 +32,10 @@ public class AopLogQueryDto {
|
||||
private String ipAddress;
|
||||
|
||||
/** 开始时间 */
|
||||
private LocalDateTime startTime;
|
||||
private OffsetDateTime startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
private LocalDateTime endTime;
|
||||
private OffsetDateTime endTime;
|
||||
|
||||
/** 最小执行时间(毫秒) */
|
||||
private Long minExecutionTime;
|
||||
|
||||
@@ -96,13 +96,11 @@ public class AopLogRepository extends AopLogDao {
|
||||
|
||||
// 时间范围查询
|
||||
if (queryDto.getStartTime() != null) {
|
||||
OffsetDateTime startTime = queryDto.getStartTime().atOffset(OffsetDateTime.now().getOffset());
|
||||
condition = condition.and(AOP_LOG.CREATE_TIME.ge(startTime));
|
||||
condition = condition.and(AOP_LOG.CREATE_TIME.ge(queryDto.getStartTime()));
|
||||
}
|
||||
|
||||
if (queryDto.getEndTime() != null) {
|
||||
OffsetDateTime endTime = queryDto.getEndTime().atOffset(OffsetDateTime.now().getOffset());
|
||||
condition = condition.and(AOP_LOG.CREATE_TIME.le(endTime));
|
||||
condition = condition.and(AOP_LOG.CREATE_TIME.le(queryDto.getEndTime()));
|
||||
}
|
||||
|
||||
// 执行时间范围
|
||||
|
||||
Reference in New Issue
Block a user