package com.oqpo.api.mapper.stinfo;


import com.oqpo.api.entity.stinfo.SpplyEntity;
import com.oqpo.api.entity.stinfo.SpplyMgrEntity;
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 SupplyMapper {

    List<SpplyEntity> selectPopSpplyGridList(@Param("sBrandId") String sBrandId, @Param("sSpplyNm") String sSpplyNm, GridRequest gridRequest)throws Exception;
    int selectPopSpplyGridCnt(@Param("sBrandId") String sBrandId, @Param("sSpplyNm") String sSpplyNm)throws Exception;

    List<SpplyEntity> selectSpplyGridList(@Param("sBrandId") String sBrandId, @Param("sStCd") String sStCd, @Param("sBsnsRegNo") String sBsnsRegNo, @Param("sSpplyNm") String sSpplyNm, GridRequest gridRequest)throws Exception;
    int selectSpplyGridCnt(@Param("sBrandId") String sBrandId, @Param("sStCd") String sStCd, @Param("sBsnsRegNo") String sBsnsRegNo, @Param("sSpplyNm") String sSpplyNm)throws Exception;

    int insertSpplyInfo(@Param("userId") String userId, SpplyEntity entity) throws Exception;
    int updateSpplyInfo(@Param("userId") String userId, SpplyEntity entity) throws Exception;

    int insertSpplyMgrInfo(@Param("userId") String userId, List<SpplyMgrEntity> gridInsertData) throws Exception;
    int deleteSpplyMgrInfo(@Param("spplyId") String spplyId, List<SpplyMgrEntity> gridDeleteData) throws Exception;

    SpplyEntity selectSpplyInfo(@Param("brandId") String brandId, @Param("spplyId") String spplyId)   throws Exception;

    List<SpplyMgrEntity> selectSpplyMgrList(@Param("spplyId") String spplyId)throws Exception;

    String selectSpplyInitPw(@Param("brandId") String brandId, @Param("spplyId") String spplyId)   throws Exception;

    int selectMaxSpplyMgrId( @Param("spplyId") String spplyId)   throws Exception;



}
