package jnpf.attendance.mapper;

import jnpf.base.mapper.SuperMapper;
import jnpf.entity.attendance.AttendanceAppUserSetting;
import jnpf.model.attendance.dto.AppUserSettingQueryDto;
import jnpf.model.attendance.dto.AttendanceAppUserSettingDto;
import jnpf.model.attendance.vo.UserSettingVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author huanglinpan
 * @Date 2024/8/8 10:57
 * @Version 1.0 （版本号）
 */
public interface AttendanceUserSettingMapper extends SuperMapper<AttendanceAppUserSetting> {

    /** 新增配置 */
    void add(@Param("attendanceAppUserSettingDto") AttendanceAppUserSettingDto attendanceAppUserSettingDto);

    /** 查询是否重复 */
    String getDetail(@Param("attendanceAppUserSettingDto") AttendanceAppUserSettingDto attendanceAppUserSettingDto);

    /** 更新配置 */
    void update(@Param("attendanceAppUserSettingDto") AttendanceAppUserSettingDto attendanceAppUserSettingDto);

    /** 根据父级Id查询设置列表 */
    List<UserSettingVo> getSettingList(@Param("pId") String pId, @Param("type") Integer type);

    /** 查询用户设置/考勤组设置 */
    List<UserSettingVo> getUserSetting(@Param("appUserSettingQueryDto") AppUserSettingQueryDto appUserSettingQueryDto);

    /** 批量获取考勤组设置 */
    List<UserSettingVo> getGroupSetting(@Param("groupIds") List<String> groupIds, @Param("type") Integer type);

    /** 根据用户编码及用户批量获取设置 */
    List<UserSettingVo> getUserSettingByCode(@Param("associationId") List<String> associationId, @Param("type") Integer type, @Param("code") List<String> code);
}
