|
|
@@ -937,6 +937,37 @@ public class TsaShoplinkerService {
|
|
|
throw new IllegalStateException(e);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 상품등록-기획전 엑셀 다운로드
|
|
|
+ *
|
|
|
+ * @param shoplinkerSearch
|
|
|
+ * @param excelFilenameWithPath - 경로를 포함한 엑셀파일명
|
|
|
+ * @return
|
|
|
+ * @author jmh
|
|
|
+ * @since 2021. 11. 16
|
|
|
+ */
|
|
|
+ public void getGoodsSendExcelPlanning(ShoplinkerSearch shoplinkerSearch, String excelFilenameWithPath) {
|
|
|
+
|
|
|
+ // 헤더 title 설정
|
|
|
+ String[] listTitles = {"샵링커 상품코드\n(단품아님.상품기준)", "sku코드", "선택1", "선택2"};
|
|
|
+
|
|
|
+ // DB 처리 시 사용되는 파라미터명(셀명) 설정
|
|
|
+ String[] cellNames = {"API_PRODUCT_ID", "OPT_CD", "OPT_CD1", "OPT_CD2"};
|
|
|
+
|
|
|
+ String[] cellTypes = {
|
|
|
+ GagaExcelConstants.CellType.CHAR_LEFT.name(), GagaExcelConstants.CellType.CHAR_LEFT.name(),
|
|
|
+ GagaExcelConstants.CellType.CHAR_LEFT.name(), GagaExcelConstants.CellType.CHAR_LEFT.name()};
|
|
|
+
|
|
|
+ Collection<GagaMap> dataList = admShoplinkerDao.getGoodsSendExcelPlanning(shoplinkerSearch);
|
|
|
+
|
|
|
+ try {
|
|
|
+
|
|
|
+ GagaExcelUtil.createExcel(excelFilenameWithPath, dataList, listTitles, cellNames, cellTypes);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new IllegalStateException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
/**
|