package com.oqpo.api.mapper.stinfo;

import com.oqpo.api.entity.stinfo.ItemUnitEntity;
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 ItemUnitMapper {

    List<ItemUnitEntity> selectItemUnitGridList(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sUnitStCd") String sUnitStCd, @Param("sSpplyId") String sSpplyId, @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 selectItemUnitGridCnt(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sUnitStCd") String sUnitStCd, @Param("sSpplyId") String sSpplyId, @Param("sClass1") String sClass1, @Param("sClass2") String sClass2, @Param("sClass3") String sClass3, @Param("sClass4") String sClass4, @Param("sItemNm") String sItemNm)throws Exception;

    ItemUnitEntity selectItemUnitInfo(@Param("brandId") String brandId, @Param("brandUnitUnqNo") String brandUnitUnqNo)throws Exception;
    ItemUnitEntity selectItemUnitDupContInfoNo(@Param("brandId") String brandId, @Param("spplyId") String spplyId, @Param("itemId") String itemId, @Param("contSttDt") String contSttDt, @Param("contEndDt") String contEndDt)throws Exception;
    int updateItemUnitContEnd(@Param("brandId") String brandId, @Param("brandUnitUnqNo") String brandUnitUnqNo, @Param("contEndDt") String contEndDt) throws Exception;

    int insertMergItemUnitInfo(@Param("userId") String userId, ItemUnitEntity entity) throws Exception;


}
