fix: 修复用户创建时间条件查询没用的bug
修复用户创建时间条件查询没用的bug 增加系统日志操作时间条件查询
This commit is contained in:
@@ -28,7 +28,7 @@ public interface SysLogMapper extends BaseMapper<SysLog> {
|
||||
* @param queryParams
|
||||
* @return
|
||||
*/
|
||||
Page<LogPageVO> listPagedLogs(Page page, LogPageQuery queryParams);
|
||||
Page<LogPageVO> listPagedLogs(Page<LogPageVO> page, LogPageQuery queryParams);
|
||||
|
||||
/**
|
||||
* 统计浏览数(PV)
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.youlai.system.common.base.BasePageQuery;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 日志分页查询对象
|
||||
@@ -20,12 +20,7 @@ public class LogPageQuery extends BasePageQuery {
|
||||
@Schema(description="关键字(日志内容/请求路径/请求方法/地区/浏览器/终端系统)")
|
||||
private String keywords;
|
||||
|
||||
@Schema(description="开始日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private String startDate;
|
||||
|
||||
@Schema(description="结束日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private String endDate;
|
||||
@Schema(description="操作时间范围")
|
||||
List<String> createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -38,10 +38,7 @@ public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog>
|
||||
*/
|
||||
@Override
|
||||
public Page<LogPageVO> listPagedLogs(LogPageQuery queryParams) {
|
||||
// 格式化为数据库日期格式,避免日期比较使用格式化函数导致索引失效
|
||||
DateUtils.toDatabaseFormat(queryParams, "startDate", "endDate");
|
||||
|
||||
return this.baseMapper.listPagedLogs(new Page(queryParams.getPageNum(), queryParams.getPageSize()),
|
||||
return this.baseMapper.listPagedLogs(new Page<>(queryParams.getPageNum(), queryParams.getPageSize()),
|
||||
queryParams);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user