Jay
2024-10-09 41aaa0cc7c5fe00724be8fa44764a1fbc0c46dc9
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
package com.iailab.module.infra.dal.mysql.demo.demo01;
 
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.infra.controller.admin.demo.demo01.vo.Demo01ContactPageReqVO;
import com.iailab.module.infra.dal.dataobject.demo.demo01.Demo01ContactDO;
import org.apache.ibatis.annotations.Mapper;
 
/**
 * 示例联系人 Mapper
 *
 * @author iailab
 */
@Mapper
public interface Demo01ContactMapper extends BaseMapperX<Demo01ContactDO> {
 
    default PageResult<Demo01ContactDO> selectPage(Demo01ContactPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<Demo01ContactDO>()
                .likeIfPresent(Demo01ContactDO::getName, reqVO.getName())
                .eqIfPresent(Demo01ContactDO::getSex, reqVO.getSex())
                .betweenIfPresent(Demo01ContactDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(Demo01ContactDO::getId));
    }
 
}