潘志宝
2024-09-09 ed81b7371e376df35448b81531d30dd9024bd44a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.iailab.module.infra.dal.mysql.demo;
 
import java.util.*;
 
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.iailab.framework.mybatis.core.mapper.BaseMapperX;
import com.iailab.module.infra.dal.dataobject.demo.InfraStudentDO;
import org.apache.ibatis.annotations.Mapper;
import com.iailab.module.infra.controller.admin.demo.vo.*;
 
/**
 * 学生 Mapper
 *
 * @author iailab
 */
@Mapper
public interface InfraStudentMapper extends BaseMapperX<InfraStudentDO> {
 
    default PageResult<InfraStudentDO> selectPage(InfraStudentPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<InfraStudentDO>()
                .likeIfPresent(InfraStudentDO::getName, reqVO.getName())
                .eqIfPresent(InfraStudentDO::getBirthday, reqVO.getBirthday())
                .eqIfPresent(InfraStudentDO::getSex, reqVO.getSex())
                .eqIfPresent(InfraStudentDO::getEnabled, reqVO.getEnabled())
                .betweenIfPresent(InfraStudentDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(InfraStudentDO::getId));
    }
 
}