SalaryGroupUserDao.java 1.69 KB
package cn.fw.morax.dao.salary;

import cn.fw.morax.domain.db.salary.SalaryGroupUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.YearMonth;
import java.util.Date;

/**
 * @author : kurisu
 * @className : SalaryGroupUserDao
 * @description : 薪酬组人员
 * @date : 2022-04-06 14:54
 */
@Repository
public interface SalaryGroupUserDao extends BaseMapper<SalaryGroupUser> {
    /**
     * 查询薪酬组人员
     *
     * @param userId   用户id
     * @param postId   岗位id
     * @param shopId   在职门店id
     * @param dataDate 日期
     * @return 薪酬组人员
     */
    SalaryGroupUser queryUserByPostShopAndUserId(@Param("userId") final Long userId,
                                                 @Param("postId") final Long postId,
                                                 @Param("shopId") final Long shopId,
                                                 @Param("dataDate") final Date dataDate);

    /**
     * 获取某月最近的绩效组人员数据
     *
     * @param sgc
     * @param monthly
     * @return
     */
    SalaryGroupUser getMonthLastData(@Param("sgc") String sgc,
                                     @Param("userId") Long userId,
                                     @Param("monthly") YearMonth monthly);

    /**
     * 获取某月最近的绩效组人员数据
     *
     * @param sgc
     * @param monthly
     * @return
     */
    SalaryGroupUser getMonthFirstData(@Param("sgc") String sgc,
                                     @Param("userId") Long userId,
                                     @Param("monthly") YearMonth monthly);
}