package incheon.ags.ias.authrtAplyMng.mapper;

import incheon.ags.ias.authrtAplyMng.vo.AuthrtAplyMngSearchVO;
import incheon.ags.ias.authrtAplyMng.vo.AuthrtAplyMngVO;
import incheon.com.config.annotation.MainDB;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;

import java.util.List;
import java.util.Map;

@org.egovframe.rte.psl.dataaccess.mapper.Mapper @incheon.com.config.annotation.MainDB
public interface AuthrtAplyMngMapper {
    // 목록 조회
    List<Map<String, Object>> selectUserRoleAplyList(AuthrtAplyMngSearchVO authrtAplyMngSearchVO) throws Exception;

    // 총 개수
    int selectUserRoleAplyTotalCnt(AuthrtAplyMngSearchVO authrtAplyMngSearchVO) throws Exception;

    // AplySn 값으로 사용자 요청 마스터 조회
    AuthrtAplyMngVO selectUserRoleAplyMstWithAplySn(AuthrtAplyMngVO authrtAplyMngVO) throws Exception;

    // AplySn 값으로 특정 사용자 요청 상세 조회
    List<Map<String, Object>> selectUserRoleAplyDtlWithAplySn(AuthrtAplyMngVO authrtAplyMngVO) throws Exception;

    // 사용자 역할 승인
    int approveUserRoleAplyWithMpng(AuthrtAplyMngVO authrtAplyMngVO) throws Exception;

    // 신청 상태 수정
    int updateAplyStcd(AuthrtAplyMngVO authrtAplyMngVO) throws Exception;

    // 사용자 역할 삭제
    int deleteUserRoleMpng(AuthrtAplyMngVO authrtAplyMngVO) throws Exception;

    // 사용자 역할 상세 조회
    AuthrtAplyMngVO selectUserRoleAplyDetail(AuthrtAplyMngVO authrtAplyMngVO) throws Exception;

    // 역할 보유 여부 확인
    List<Map<String, Object>> isExistUserRoleMpng(AuthrtAplyMngVO authrtAplyMngVO) throws Exception;

    // 시스템별 사용자 권한 전체 삭제
    int deleteUserRolesBySystem(Map<String, Object> params) throws Exception;

    // 기존 신청 마스터 만료 처리
    int expireUserRoleAplyMst(Map<String, Object> params) throws Exception;
}
