package com.oqpo.api.mapper.oper;


import com.oqpo.api.entity.oper.AfflEntity;
import com.oqpo.api.entity.oper.AfflSaleInfoEntity;
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 AfflMapper {

    List<AfflEntity> selectTargetAfflGridList(@Param("userId") String userId, @Param("authTpCd") String authTpCd )throws Exception;
    List<AfflEntity> selectPopAfflGridList(@Param("userId") String userId, @Param("authTpCd") String authTpCd, @Param("afflShopNm") String afflShopNm , GridRequest gridRequest)throws Exception;
    int selectPopAfflGridCnt(@Param("userId") String userId, @Param("authTpCd") String authTpCd, @Param("afflShopNm") String afflShopNm )throws Exception;

    int selectAfflShopGridCnt( @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sAfflShopNm") String sAfflShopNm, @Param("sStCd") String sStCd)throws Exception;

    List<AfflEntity> selectAfflShopGridList(@Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sAfflShopNm") String sAfflShopNm, @Param("sStCd") String sStCd , GridRequest gridRequest)throws Exception;

    String selectAfflAbbrDupYn(@Param("afflAbbr") String afflAbbr)   throws Exception;

    int insertAfflShopBaseInfo(@Param("userId") String userId, AfflEntity entity) throws Exception;
    int updateAfflShopBaseInfo(@Param("userId") String userId, AfflEntity entity) throws Exception;

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

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

    AfflEntity selectAfflShopBaseInfo(@Param("afflShopId") String afflShopId)   throws Exception;

    List<AfflSaleInfoEntity> selectAfflSaleTargetList(@Param("afflShopId") String afflShopId)throws Exception;

    String selectAfflShopInitPw(@Param("afflShopId") String afflShopId)   throws Exception;


}
