package cn.iocoder.yudao.module.system.dal.mysql.biz;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.system.controller.admin.biz.vo.ItemPageReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.biz.NurseLevelDO;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface NurseLevelMapper extends BaseMapperX<NurseLevelDO> {

    default PageResult<NurseLevelDO> selectPage(ItemPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<NurseLevelDO>().eqIfPresent(NurseLevelDO::getStatus, reqVO.getStatus())
                .eqIfPresent(NurseLevelDO::getNurseLevelName, reqVO.getNurseLevelName())
                .eqIfPresent(NurseLevelDO::getOrgType,reqVO.getOrgType())
                .inIfPresent(NurseLevelDO::getTenantId,reqVO.getTenantIds())
                .orderByDesc(NurseLevelDO::getCreateTime));
    }
}
