潘志宝
2024-12-25 8a6b19bf5c50ebb54e965645a9366f6cfea02351
提交 | 用户 | 时间
e7c126 1 package com.iailab.module.infra.dal.mysql.demo.demo01;
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.infra.controller.admin.demo.demo01.vo.Demo01ContactPageReqVO;
7 import com.iailab.module.infra.dal.dataobject.demo.demo01.Demo01ContactDO;
8 import org.apache.ibatis.annotations.Mapper;
9
10 /**
11  * 示例联系人 Mapper
12  *
13  * @author iailab
14  */
15 @Mapper
16 public interface Demo01ContactMapper extends BaseMapperX<Demo01ContactDO> {
17
18     default PageResult<Demo01ContactDO> selectPage(Demo01ContactPageReqVO reqVO) {
19         return selectPage(reqVO, new LambdaQueryWrapperX<Demo01ContactDO>()
20                 .likeIfPresent(Demo01ContactDO::getName, reqVO.getName())
21                 .eqIfPresent(Demo01ContactDO::getSex, reqVO.getSex())
22                 .betweenIfPresent(Demo01ContactDO::getCreateTime, reqVO.getCreateTime())
23                 .orderByDesc(Demo01ContactDO::getId));
24     }
25
26 }