dengzedong
4 天以前 730d1944e3a13c517c77df2b0712df05645a38dd
提交 | 用户 | 时间
e7c126 1 package com.iailab.module.system.dal.mysql.logger;
H 2
3 import com.iailab.framework.common.pojo.PageResult;
4 import com.iailab.framework.mybatis.core.mapper.BaseMapperX;
5 import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX;
6 import com.iailab.module.system.api.logger.dto.OperateLogPageReqDTO;
7 import com.iailab.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO;
8 import com.iailab.module.system.dal.dataobject.logger.OperateLogDO;
9 import org.apache.ibatis.annotations.Mapper;
10
11 @Mapper
12 public interface OperateLogMapper extends BaseMapperX<OperateLogDO> {
13
14     default PageResult<OperateLogDO> selectPage(OperateLogPageReqVO pageReqDTO) {
15         return selectPage(pageReqDTO, new LambdaQueryWrapperX<OperateLogDO>()
16                 .eqIfPresent(OperateLogDO::getUserId, pageReqDTO.getUserId())
17                 .eqIfPresent(OperateLogDO::getBizId, pageReqDTO.getBizId())
18                 .likeIfPresent(OperateLogDO::getType, pageReqDTO.getType())
19                 .likeIfPresent(OperateLogDO::getSubType, pageReqDTO.getSubType())
20                 .likeIfPresent(OperateLogDO::getAction, pageReqDTO.getAction())
21                 .betweenIfPresent(OperateLogDO::getCreateTime, pageReqDTO.getCreateTime())
22                 .orderByDesc(OperateLogDO::getId));
23     }
24
25     default PageResult<OperateLogDO> selectPage(OperateLogPageReqDTO pageReqDTO) {
26         return selectPage(pageReqDTO, new LambdaQueryWrapperX<OperateLogDO>()
27                 .eqIfPresent(OperateLogDO::getType, pageReqDTO.getType())
28                 .eqIfPresent(OperateLogDO::getBizId, pageReqDTO.getBizId())
29                 .eqIfPresent(OperateLogDO::getUserId, pageReqDTO.getUserId())
30                 .orderByDesc(OperateLogDO::getId));
31     }
32
33 }