package com.style24.core.biz.dao;

import java.util.Collection;

import com.gagaframework.web.parameter.GagaMap;
import com.style24.core.support.annotation.ShopDs;
import com.style24.persistence.domain.ShoplinkerGoods;
import com.style24.persistence.domain.ShoplinkerInvoice;
import com.style24.persistence.domain.ShoplinkerOrder;
import com.style24.persistence.domain.ShoplinkerSearch;

/**
 * 샵링커 Dao
 *
 * @author jmh
 * @since 2021. 5. 20
 */
@ShopDs
public interface TscShoplinkerDao {

	/**
	 * 샵링커 전송 이력
	 *
	 * @param shoplinkerSearch
	 * @return
	 * @author jmh
	 * @since 2021. 5. 20
	 */
	void insertShoplinerApiHst(ShoplinkerGoods shoplinkerGoods);

	/**
	 *  샵링커 api 호출 가능여부
	 *
	 * @param
	 * @return
	 * @author jmh
	 * @since 2021. 5. 20
	 */
	ShoplinkerSearch getCallRunableInfo(ShoplinkerSearch slkSearch);

	/**
	 *  샵링커 api 호출 가능여부-상품전송용
	 *
	 * @param
	 * @return
	 * @author jmh
	 * @since 2021. 5. 20
	 */
	ShoplinkerSearch getCallRunableInfoGoods(ShoplinkerSearch slkSearch);

	/**
	 * 샵링커 api 호출 가능여부 상태 저장
	 *
	 * @param dataMap
	 * @return
	 * @author jmh
	 * @since 2021. 5. 20
	 */
	void saveCallApiRunable(ShoplinkerSearch slkSearch);

	/**
	 * 샵링커 api 호출 가능여부 상태 수정
	 *
	 * @param dataMap
	 * @return
	 * @author jmh
	 * @since 2021. 5. 20
	 */
	void updateCallApiRunable(ShoplinkerSearch slkSearch);

	/**
	 * 샵링커주문수집-주문수집등록(개별)
	 *
	 * @param shoplinkerOrder
	 * @return
	 * @author jmh
	 * @since 2021. 5. 20
	 */
	int insertShoplinkerOrder(ShoplinkerOrder shoplinkerOrder);

	/**
	 * 샵링커주문수집-주문수집등록(다수)
	 *
	 * @param dataMap
	 * @return
	 * @author jmh
	 * @since 2021. 7. 02
	 */
	void insertShoplinkerOrderList(GagaMap dataMap);
	
	/**
	 * 샵링커주문수집- 제휴몰 주문업로드여부 업데이트
	 *
	 * @param shoplinkerOrder
	 * @return
	 * @author jmh
	 * @since 2021. 5. 31
	 */
	void updateShoplinkerOrder(ShoplinkerOrder shoplinkerOrder);
	
	/**
	 * 샵링커주문수집-가용재고로 인한 실패 건, 실패사유플래그 변경(엑셀에서 재주문 가능하도록)
	 * 
	 * @param ShoplinkerOrder
	 * @author jmh
	 * @throws Exception
	 * @since 2021. 7. 28
	 */
	void updateOrderFailFlag(ShoplinkerOrder shoplinkerOrder);

	/**
	 * 제휴몰 주문등록 대상목록
	 *
	 * @param
	 * @return
	 * @author jmh
	 * @since 2021. 5. 31
	 */
	Collection<ShoplinkerOrder> getShoplinkerRegExtmallList();

	/**
	 * 송장전송-전송대상 목록
	 *
	 * @param
	 * @return
	 * @author jmh
	 * @since 2021. 5. 20
	 */
	Collection<ShoplinkerInvoice> getShoplinkerInvoiceOrdDtlSendList();

}
