dengzedong
2024-12-24 aa0382e44311f9f7e62a688c8fcaa9c69a512e0f
提交 | 用户 | 时间
e7c126 1 package com.iailab.module.infra.dal.mysql.demo.demo03;
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.demo03.vo.Demo03StudentPageReqVO;
7 import com.iailab.module.infra.dal.dataobject.demo.demo03.Demo03StudentDO;
8 import org.apache.ibatis.annotations.Mapper;
9
10 /**
11  * 学生 Mapper
12  *
13  * @author iailab
14  */
15 @Mapper
16 public interface Demo03StudentMapper extends BaseMapperX<Demo03StudentDO> {
17
18     default PageResult<Demo03StudentDO> selectPage(Demo03StudentPageReqVO reqVO) {
19         return selectPage(reqVO, new LambdaQueryWrapperX<Demo03StudentDO>()
20                 .likeIfPresent(Demo03StudentDO::getName, reqVO.getName())
21                 .eqIfPresent(Demo03StudentDO::getSex, reqVO.getSex())
22                 .eqIfPresent(Demo03StudentDO::getDescription, reqVO.getDescription())
23                 .betweenIfPresent(Demo03StudentDO::getCreateTime, reqVO.getCreateTime())
24                 .orderByDesc(Demo03StudentDO::getId));
25     }
26
27 }