package com.njcn.rdms.module.project.dal.mysql.signoff;

import com.njcn.rdms.framework.mybatis.core.mapper.BaseMapperX;
import com.njcn.rdms.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.njcn.rdms.module.project.dal.dataobject.signoff.EmployeeSignOffBatchDO;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface EmployeeSignOffBatchMapper extends BaseMapperX<EmployeeSignOffBatchDO> {

    default EmployeeSignOffBatchDO selectByPeriodMonthAndDeptId(String periodMonth, Long deptId) {
        return selectOne(new LambdaQueryWrapperX<EmployeeSignOffBatchDO>()
                .eq(EmployeeSignOffBatchDO::getPeriodMonth, periodMonth)
                .eq(EmployeeSignOffBatchDO::getDeptId, deptId));
    }
}
