package com.trs.digital.module.manager.dal.mysql.digftp02;

import com.trs.digital.framework.common.pojo.PageResult;
import com.trs.digital.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.trs.digital.framework.mybatis.core.mapper.BaseMapperX;
import com.trs.digital.module.manager.dal.dataobject.digftp02.Digftpsource02DO;
import org.apache.ibatis.annotations.Mapper;
import com.trs.digital.module.manager.controller.admin.digftp02.vo.*;

/**
 * STF02资源管理 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface digftpsource02Mapper extends BaseMapperX<Digftpsource02DO> {

    default PageResult<Digftpsource02DO> selectPage(Digftpsource02PageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<Digftpsource02DO>()
                .eqIfPresent(Digftpsource02DO::getId, reqVO.getId())
                .eqIfPresent(Digftpsource02DO::getRemark, reqVO.getRemark())
                .eqIfPresent(Digftpsource02DO::getCreator, reqVO.getCreator())
                .betweenIfPresent(Digftpsource02DO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(Digftpsource02DO::getUpdater, reqVO.getUpdater())
                .betweenIfPresent(Digftpsource02DO::getUpdateTime, reqVO.getUpdateTime())
                .eqIfPresent(Digftpsource02DO::getDeleted, reqVO.getDeleted())
                .eqIfPresent(Digftpsource02DO::getDocTitle, reqVO.getDocTitle())
                .eqIfPresent(Digftpsource02DO::getDocContent, reqVO.getDocContent())
                .eqIfPresent(Digftpsource02DO::getDocContentTranslate, reqVO.getDocContentTranslate())
                .likeIfPresent(Digftpsource02DO::getFileName, reqVO.getFileName())
                .eqIfPresent(Digftpsource02DO::getFilePath, reqVO.getFilePath())
                .eqIfPresent(Digftpsource02DO::getFileType, reqVO.getFileType())
                .betweenIfPresent(Digftpsource02DO::getFileCrtime, reqVO.getFileCrtime())
                .betweenIfPresent(Digftpsource02DO::getFileUpdatetime, reqVO.getFileUpdatetime())
                .eqIfPresent(Digftpsource02DO::getDocLable, reqVO.getDocLable())
                .likeIfPresent(Digftpsource02DO::getSourcename, reqVO.getSourcename())
                .eqIfPresent(Digftpsource02DO::getLanguage, reqVO.getLanguage())
                .orderByDesc(Digftpsource02DO::getId));
    }

}