mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 00:57:13 +08:00 
			
		
		
		
	refactor: 优化分页查询登录日志列表接口实现
利用 module 字段直接可以查询登录相关记录
This commit is contained in:
		| @@ -53,11 +53,6 @@ public class SysConsts { | ||||
|      */ | ||||
|     public static final String LOGIN_URI = "/auth/login"; | ||||
|  | ||||
|     /** | ||||
|      * 退出登录 URI | ||||
|      */ | ||||
|     public static final String LOGOUT_URI = "/auth/logout"; | ||||
|  | ||||
|     /** | ||||
|      * VO 描述类字段后缀 | ||||
|      */ | ||||
|   | ||||
| @@ -97,8 +97,7 @@ public class LogServiceImpl implements LogService { | ||||
|     @Override | ||||
|     public PageDataVO<LoginLogVO> page(LoginLogQuery query, PageQuery pageQuery) { | ||||
|         QueryWrapper<LogDO> queryWrapper = QueryHelper.build(query); | ||||
|         queryWrapper.lambda().and(qw -> qw.like(LogDO::getRequestUrl, SysConsts.LOGIN_URI).or() | ||||
|             .like(LogDO::getRequestUrl, SysConsts.LOGOUT_URI)); | ||||
|         queryWrapper.eq("module", "登录"); | ||||
|  | ||||
|         // 限定查询信息 | ||||
|         List<String> fieldNameList = ReflectUtils.getNonStaticFieldsName(LoginLogVO.class); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user