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.nursing.vo.NursingShiftPageReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.biz.NursingShiftDO;
import org.apache.ibatis.annotations.Mapper;


/**
 * 护理班次 Mapper
 *
 * @author 源码
 */
@Mapper
public interface NursingShiftMapper extends BaseMapperX<NursingShiftDO> {

    default PageResult<NursingShiftDO> selectPage(NursingShiftPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<NursingShiftDO>()
                .likeIfPresent(NursingShiftDO::getName, reqVO.getName())
                .eqIfPresent(NursingShiftDO::getOrgType,reqVO.getOrgType())
                .inIfPresent(NursingShiftDO::getTenantId,reqVO.getTenantIds())
                .orderByDesc(NursingShiftDO::getCreatedTime));
    }

}