潘志宝
8 天以前 e54ce4959bca1fdeda01701989f8debd9467d4bd
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.file;
 
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.file.vo.file.FilePageReqVO;
import com.iailab.module.infra.dal.dataobject.file.FileDO;
import org.apache.ibatis.annotations.Mapper;
 
/**
 * 文件操作 Mapper
 *
 * @author iailab
 */
@Mapper
public interface FileMapper extends BaseMapperX<FileDO> {
 
    default PageResult<FileDO> selectPage(FilePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<FileDO>()
                .likeIfPresent(FileDO::getPath, reqVO.getPath())
                .likeIfPresent(FileDO::getType, reqVO.getType())
                .betweenIfPresent(FileDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(FileDO::getId));
    }
 
}