package com.zt.plat.module.qms.business.config.dal.mapper;

import java.util.*;

import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.module.qms.business.config.controller.vo.*;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigQCStandardSampleDO;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;

/**
 * 质控与定值样关系 Mapper
 *
 * @author 后台管理
 */
@Mapper
public interface ConfigQCStandardSampleMapper extends BaseMapperX<ConfigQCStandardSampleDO> {

    default PageResult<ConfigQCStandardSampleDO> selectPage(ConfigQCStandardSamplePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ConfigQCStandardSampleDO>()
                .eqIfPresent(ConfigQCStandardSampleDO::getConfigQCSampleMethodId, reqVO.getConfigQCSampleMethodId())
                .eqIfPresent(ConfigQCStandardSampleDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
                .eqIfPresent(ConfigQCStandardSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
                .betweenIfPresent(ConfigQCStandardSampleDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(ConfigQCStandardSampleDO::getRemark, reqVO.getRemark())
                .orderByDesc(ConfigQCStandardSampleDO::getId));
    }

}