package com.oqpo.api.mapper.system;

import com.oqpo.api.entity.oper.AuthDtlEntity;
import com.oqpo.api.entity.oper.AuthEntity;
import com.oqpo.api.web.dto.request.GridRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AuthMapper {

    List<AuthEntity> selectSearchAuthList(@Param("sAuthTpCd") String sAuthTpCd, @Param("sTopMenuNo") String sTopMenuNo, @Param("sUseYn") String sUseYn, @Param("sAuthNm") String sAuthNm) throws Exception;
    AuthEntity selectAuthInfo(@Param("authNo") String authNo) throws Exception;
    List<AuthEntity> selectAuthDtlGridList(@Param("authNo") String authNo, GridRequest gridRequest) throws Exception;
    String selectAuthDupYn(@Param("authNo") String authNo);
    int selectAuthDtlGridListCnt(@Param("authNo") String authNo) throws Exception;
    int insertAuthInfo(@Param("userId") String userId, AuthEntity entity) throws Exception;
    int updateAuthInfo(@Param("userId") String userId, AuthEntity entity) throws Exception;
    int insertAuthDtl(@Param("userId") String userId, List<AuthDtlEntity> gridInsertData) throws Exception;
    int updateAuthDtl(@Param("userId") String userId, List<AuthDtlEntity> gridUpdateData) throws Exception;
    int deleteAuthDtl(@Param("authNo") String codeCd, List<AuthDtlEntity> gridDeleteData) throws Exception;

    List<AuthEntity> selectAuthSearchGridList(@Param("authTpCd") String authTpCd, @Param("sAuthTpCd") String sAuthTpCd, @Param("sAuthNm") String sAuthNm, GridRequest gridRequest) throws Exception;
    int selectAuthSearchGridListCnt(@Param("authTpCd") String authTpCd, @Param("sAuthTpCd") String sAuthTpCd, @Param("sAuthNm") String sAuthNm) throws Exception;
}
