package com.oqpo.api.mapper.stinfo;


import com.oqpo.api.entity.stinfo.ItemClassEntity;
import com.oqpo.api.entity.stinfo.ItemClassMngEntity;
import com.oqpo.api.entity.stinfo.ItemEntity;
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 ItemMapper {

    List<ItemEntity> selectPopItemGridList(@Param("sBrandId") String sBrandId, @Param("sPodrPssblDvsn") String sPodrPssblDvsn, @Param("sItemNm") String sItemNm, GridRequest gridRequest)throws Exception;
    int selectPopItemGridCnt(@Param("sBrandId") String sBrandId, @Param("sPodrPssblDvsn") String sPodrPssblDvsn, @Param("sItemNm") String sItemNm)throws Exception;

    List<ItemEntity> selectItemGridList(@Param("sBrandId") String sBrandId, @Param("sItemStCd") String sItemStCd, @Param("sPodrPssblDvsn") String sPodrPssblDvsn, @Param("sItemType") String sItemType, @Param("sItemGubun") String sItemGubun, @Param("sClass1") String sClass1, @Param("sClass2") String sClass2, @Param("sClass3") String sClass3, @Param("sClass4") String sClass4, @Param("sItemNm") String sItemNm, GridRequest gridRequest)throws Exception;
    int selectItemGridCnt(@Param("sBrandId") String sBrandId, @Param("sItemStCd") String sItemStCd, @Param("sPodrPssblDvsn") String sPodrPssblDvsn, @Param("sItemType") String sItemType, @Param("sItemGubun") String sItemGubun, @Param("sClass1") String sClass1, @Param("sClass2") String sClass2, @Param("sClass3") String sClass3, @Param("sClass4") String sClass4, @Param("sItemNm") String sItemNm)throws Exception;

    ItemEntity selectItemInfo(@Param("brandId") String brandId, @Param("itemId") String itemId)throws Exception;

    int insertItemInfo(@Param("userId") String userId, ItemEntity entity) throws Exception;
    int insertItemClassInfo(@Param("userId") String userId, ItemClassEntity entity) throws Exception;

    int updateItemInfo(@Param("userId") String userId, ItemEntity entity) throws Exception;
    int updateItemClassInfo(@Param("userId") String userId, ItemClassEntity entity) throws Exception;
    int deleteItemClassInfo( @Param("itemId") String itemId) throws Exception;


    ItemClassMngEntity selectItemClassMngNo(@Param("brandId") String brandId, @Param("class1") String class1, @Param("class2") String class2 , @Param("class3") String class3,  @Param("class4") String class4)throws Exception;

    int insertItemClassMngInfo(@Param("userId") String userId, ItemClassMngEntity entity) throws Exception;
    int updateItemClassMngInfo(@Param("userId") String userId, ItemClassMngEntity entity) throws Exception;
    int deleteItemClassMngInfo(@Param("userId") String userId, List<ItemClassMngEntity> gridDeleteData) throws Exception;


    List<ItemClassMngEntity> selectItemClassMngGridList(@Param("sBrandId") String sBrandId, @Param("sItemClass1") String sItemClass1, @Param("sItemClass2") String sItemClass2,  @Param("sItemClass3") String sItemClass3, @Param("sItemClass4") String sItemClass4,@Param("sItemClassNm") String sItemClassNm, GridRequest gridRequest)throws Exception;
    int selectItemClassMngGridCnt(@Param("sBrandId") String sBrandId, @Param("sItemClass1") String sItemClass1, @Param("sItemClass2") String sItemClass2,  @Param("sItemClass3") String sItemClass3, @Param("sItemClass4") String sItemClass4,@Param("sItemClassNm") String sItemClassNm)throws Exception;
    ItemClassMngEntity selectItemClassMngInfo(@Param("brandId") String brandId, @Param("itemClassMgntNo") String itemClassMgntNo)throws Exception;

    int selectItemClassMaxClass(@Param("sBrandId") String sBrandId, @Param("cLevel") String cLevel, @Param("sItemClass1") String sItemClass1, @Param("sItemClass2") String sItemClass2,  @Param("sItemClass3") String sItemClass3, @Param("sItemClass4") String sItemClass4);

}
