package com.oqpo.api.mapper.system;

import com.oqpo.api.entity.CodeEntity;
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 CodeMapper {
    List<CodeEntity> selectCodeDtlGridList(@Param("codeCd") String codeCd, @Param("useYn") String useYn, GridRequest gridRequest) throws Exception;

    List<CodeEntity> selectSearchCodeList(@Param("sCodeNm") String sCodeNm, @Param("sCodeTpCd") String sCodeTpCd, @Param("sUseYn") String sUseYn) throws Exception;

    List<CodeEntity> selectCodeList() throws Exception;

    CodeEntity selectCodeInfo(@Param("codeCd") String codeCd) throws Exception;

    List<CodeEntity> selectCodeDtlList(@Param("codeCd") String codeCd);

    int selectCodeDtlGridListCnt(@Param("codeCd") String codeCd) throws Exception;

    String selectCodeDupYn(@Param("codeCd") String codeCd);

    int insertCodeInfo(@Param("userId") String userId, CodeEntity entity) throws Exception;

    int updateCodeInfo(@Param("userId") String userId, CodeEntity entity) throws Exception;

    int insertCodeDtl(@Param("userId") String userId, List<CodeEntity> gridInsertData) throws Exception;

    int updateCodeDtl(@Param("userId") String userId, List<CodeEntity> gridUpdateData) throws Exception;

    int deleteCodeDtl(@Param("codeCd") String codeCd, List<CodeEntity> gridDeleteData) throws Exception;
}
