package com.style24.admin.biz.service;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.gagaframework.excel.GagaExcelUtil;
import com.gagaframework.excel.env.GagaExcelConstants;
import com.gagaframework.web.parameter.GagaMap;
import com.gagaframework.web.util.GagaDateUtil;
import com.gagaframework.web.util.GagaFileUtil;
import com.gagaframework.web.util.GagaStringUtil;
import com.style24.admin.biz.dao.TsaGoodsDao;
import com.style24.admin.biz.dao.TsaMarketingDao;
import com.style24.admin.support.env.TsaConstants;
import com.style24.admin.support.security.session.TsaSession;
import com.style24.core.biz.thirdparty.NaverLowestPriceApi;
import com.style24.core.biz.thirdparty.SafetyKoreaApi;
import com.style24.core.support.message.TscMessageByLocale;
import com.style24.persistence.domain.*;
import io.netty.util.internal.StringUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Collection;

/**
 *상품관리 Service
 *
 * @author xodud1202
 * @since 2020. 12. 17
 */
@Service
@Slf4j
public class TsaMarketingService {

	@Autowired
	private TscMessageByLocale message;

	@Autowired
	private Environment env;

	@Autowired
	private TsaMarketingDao marketingDao;

	@Autowired
	private TsaBusinessService businessService;

	@Autowired
	private TsaCommonService commonService;

	@Autowired
	private TsaRendererService rendererService;

	@Autowired
	private TsaNoticeService noticeService;

	@Autowired
	private SafetyKoreaApi safetyKoreaApi;

	@Autowired
	private NaverLowestPriceApi naverLowestPriceApi;


	@Autowired
	private ObjectMapper mapper;

	private static final String NUMBER_PATTERN = "^[0-9]+$";

	private static final String SELF_GOOODS_AFTER = "STY";

	/* xodud1202 진행 */

	/**
	 * 사은품 프로모션 리스트
	 * @param param
	 * @return
	 * @author xodud1202
	 * @since 2020. 12. 17
	 */
	public Collection<FreeGoodsPromotion> getFreeGoodsPromotionList(FreeGoodsPromotion param) {
		return marketingDao.getFreeGoodsPromotionList(param);
	}

	/* // xodud1202 진행 */

	/* JSM 진행 */

	/* // JSM 진행 */

}
