package com.iailab.module.system.dal.mysql.logger; import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.mybatis.core.mapper.BaseMapperX; import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; import com.iailab.module.system.api.logger.dto.OperateLogPageReqDTO; import com.iailab.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; import com.iailab.module.system.dal.dataobject.logger.OperateLogDO; import org.apache.ibatis.annotations.Mapper; @Mapper public interface OperateLogMapper extends BaseMapperX { default PageResult selectPage(OperateLogPageReqVO pageReqDTO) { return selectPage(pageReqDTO, new LambdaQueryWrapperX() .eqIfPresent(OperateLogDO::getUserId, pageReqDTO.getUserId()) .eqIfPresent(OperateLogDO::getBizId, pageReqDTO.getBizId()) .likeIfPresent(OperateLogDO::getType, pageReqDTO.getType()) .likeIfPresent(OperateLogDO::getSubType, pageReqDTO.getSubType()) .likeIfPresent(OperateLogDO::getAction, pageReqDTO.getAction()) .betweenIfPresent(OperateLogDO::getCreateTime, pageReqDTO.getCreateTime()) .orderByDesc(OperateLogDO::getId)); } default PageResult selectPage(OperateLogPageReqDTO pageReqDTO) { return selectPage(pageReqDTO, new LambdaQueryWrapperX() .eqIfPresent(OperateLogDO::getType, pageReqDTO.getType()) .eqIfPresent(OperateLogDO::getBizId, pageReqDTO.getBizId()) .eqIfPresent(OperateLogDO::getUserId, pageReqDTO.getUserId()) .orderByDesc(OperateLogDO::getId)); } }