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

import java.util.*;

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

/**
 * 加班更多规则拓展 Mapper
 *
 * @author 艾楷
 */
@Mapper
public interface WorkOvertimeMoreRuleExtMapper extends BaseMapperX<WorkOvertimeMoreRuleExtDO> {

    default PageResult<WorkOvertimeMoreRuleExtDO> selectPage(WorkOvertimeMoreRuleExtPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WorkOvertimeMoreRuleExtDO>()
                .eqIfPresent(WorkOvertimeMoreRuleExtDO::getMoreRuleId, reqVO.getMoreRuleId())
                .eqIfPresent(WorkOvertimeMoreRuleExtDO::getType, reqVO.getType())
                .eqIfPresent(WorkOvertimeMoreRuleExtDO::getDayType, reqVO.getDayType())
                .eqIfPresent(WorkOvertimeMoreRuleExtDO::getThreshold, reqVO.getThreshold())
                .betweenIfPresent(WorkOvertimeMoreRuleExtDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(WorkOvertimeMoreRuleExtDO::getId));
    }

}