package com.oqpo.api.mapper.oper;


import com.oqpo.api.entity.oper.UserAuthInfoEntity;
import com.oqpo.api.entity.oper.UserMngEntity;
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 UserMngMapper {

    List<UserMngEntity> selectUserGridList(@Param("afflShopId") String afflShopId, @Param("brandId") String brandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sUserNm") String sUserNm, @Param("sUserStatCd") String sUserStatCd, @Param("sAuthTpCd") String sAuthTpCd, GridRequest gridRequest) throws Exception;

    int selectUserGridListCnt(@Param("afflShopId") String afflShopId, @Param("brandId") String brandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sUserNm") String sUserNm, @Param("sUserStatCd") String sUserStatCd, @Param("sAuthTpCd") String sAuthTpCd) throws Exception;

    String selectUserIdDupYn(@Param("userId") String userId) throws Exception;

    int insertUserInfo(@Param("userId") String userId, UserMngEntity entity) throws Exception;

    int updateUserInfo(@Param("userId") String userId, UserMngEntity entity) throws Exception;

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

    int deleteUserAuth(@Param("userId") String userId, List<UserAuthInfoEntity> gridDeleteData) throws Exception;

    int updateInitUserPw(@Param("userId") String userId, @Param("userPw") String userPw) throws Exception;

    List<UserAuthInfoEntity> selectUserAuthGridList(@Param("userId") String userId, GridRequest gridRequest) throws Exception;

    int selectUserAuthGridListCnt(@Param("userId") String userId) throws Exception;

    UserMngEntity selectUserInfo(@Param("userId") String userId) throws Exception;

    List<UserMngEntity> selectPopUserGridList(@Param("sAfflShopId") String sAfflShopId, @Param("sBrandId") String sBrandId, @Param("sUserId") String sUserId, @Param("sUserNm") String sUserNm, @Param("sUserStatCd") String sUserStatCd, GridRequest gridRequest) throws Exception;

    int selectPopUserGridCnt( @Param("sAfflShopId") String sAfflShopId, @Param("sBrandId") String sBrandId, @Param("sUserId") String sUserId, @Param("sUserNm") String sUserNm, @Param("sUserStatCd") String sUserStatCd) throws Exception;


    int insertFrcompUserAuth(@Param("userId") String userId, @Param("authTpCd") String authTpCd, @Param("addId") String addId) throws Exception;

    int deleteFrcompUserAuth(@Param("userId") String userId) throws Exception;

    int updateLoginDt(@Param("userId") String userId) throws Exception;

    int updatePrivateUserInfo(@Param("userId") String userId, UserMngEntity entity) throws Exception;

    int insertUserTypeAuth(@Param("newId") String newId, @Param("userId") String userId, @Param("authTpCd") String authTpCd) throws Exception;

}
