package cn.iocoder.yudao.module.hrm.dal.mysql.salary;
|
|
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.hrm.controller.admin.salary.vo.HrmSalaryPaymentPageReqVO;
|
import cn.iocoder.yudao.module.hrm.dal.dataobject.salary.HrmSalaryPaymentDO;
|
import org.apache.ibatis.annotations.Mapper;
|
|
/**
|
* 薪资发放台账 Mapper
|
*
|
* @author 芋道源码
|
*/
|
@Mapper
|
public interface HrmSalaryPaymentMapper extends BaseMapperX<HrmSalaryPaymentDO> {
|
|
default PageResult<HrmSalaryPaymentDO> selectPage(HrmSalaryPaymentPageReqVO reqVO) {
|
return selectPage(reqVO, new LambdaQueryWrapperX<HrmSalaryPaymentDO>()
|
.likeIfPresent(HrmSalaryPaymentDO::getNo, reqVO.getNo())
|
.eqIfPresent(HrmSalaryPaymentDO::getPeriod, reqVO.getPeriod())
|
.eqIfPresent(HrmSalaryPaymentDO::getStatus, reqVO.getStatus())
|
.orderByDesc(HrmSalaryPaymentDO::getId));
|
}
|
|
default HrmSalaryPaymentDO selectByNo(String no) {
|
return selectOne(HrmSalaryPaymentDO::getNo, no);
|
}
|
|
default HrmSalaryPaymentDO selectByPeriod(String period) {
|
return selectOne(new LambdaQueryWrapperX<HrmSalaryPaymentDO>()
|
.eq(HrmSalaryPaymentDO::getPeriod, period)
|
.orderByDesc(HrmSalaryPaymentDO::getId)
|
.last("LIMIT 1"));
|
}
|
|
}
|