package com.oqpo.api.mapper.stockmng;


import com.oqpo.api.entity.stockmng.WhsMgntBaseInfoEntity;
import com.oqpo.api.entity.stockmng.WhsMgntBaseLocEntity;
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 WhsMngMapper {

    List<WhsMgntBaseInfoEntity> selectWhsMngGridList(@Param("sBrandId") String sBrandId, @Param("sStoreId") String sStoreId, @Param("sWhsDvsn") String sWhsDvsn, @Param("sWhsStCd") String sWhsStCd,
                                                     @Param("sWhsNm") String sWhsNm, GridRequest gridRequest) throws Exception;

    int selectWhsMngGridCnt(@Param("sBrandId") String sBrandId, @Param("sStoreId") String sStoreId, @Param("sWhsDvsn") String sWhsDvsn, @Param("sWhsStCd") String sWhsStCd,
                            @Param("sWhsNm") String sWhsNm) throws Exception;

    WhsMgntBaseInfoEntity selectWhsMgntBaseInfo(@Param("brandId") String brandId, @Param("whsId") String whsId) throws Exception;

    List<WhsMgntBaseLocEntity> selectWhsLocGridList(@Param("brandId") String brandId, @Param("whsId") String whsId) throws Exception;

    int insertWhsMgntBaseInfo(@Param("userId") String userId, WhsMgntBaseInfoEntity entity) throws Exception;

    int updateWhsMgntBaseInfo(@Param("userId") String userId, WhsMgntBaseInfoEntity entity) throws Exception;

    int deleteWhsMgntBaseInfo(@Param("userId") String userId, WhsMgntBaseInfoEntity entity) throws Exception;

    int deleteWhsMgntBaseLoc4Info(@Param("userId") String userId, WhsMgntBaseInfoEntity entity) throws Exception;

    int insertWhsMgntBaseLoc(@Param("userId") String userId, WhsMgntBaseLocEntity entity) throws Exception;

    int updateWhsMgntBaseLoc(@Param("userId") String userId, WhsMgntBaseLocEntity entity) throws Exception;

    int deleteWhsMgntBaseLoc(@Param("userId") String userId, WhsMgntBaseLocEntity entity) throws Exception;

}
