|
@@ -79,7 +79,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TssRendererService rendererService;
|
|
private TssRendererService rendererService;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TssBusinessService businessService;
|
|
private TssBusinessService businessService;
|
|
|
|
|
|
|
@@ -87,7 +87,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
private TssCommonService commonService;
|
|
private TssCommonService commonService;
|
|
|
|
|
|
|
|
private static final int EXCEL_ROW_COUNT = 1000;
|
|
private static final int EXCEL_ROW_COUNT = 1000;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 상품목록 화면
|
|
* 상품목록 화면
|
|
|
*
|
|
*
|
|
@@ -336,9 +336,9 @@ public class TssGoodsController extends TssBaseController {
|
|
|
|
|
|
|
|
//건수
|
|
//건수
|
|
|
if (ecxelGoodsList != null && ecxelGoodsList.size() > EXCEL_ROW_COUNT) {
|
|
if (ecxelGoodsList != null && ecxelGoodsList.size() > EXCEL_ROW_COUNT) {
|
|
|
- throw new IllegalStateException("엑셀 파일의 건수를 " +EXCEL_ROW_COUNT + "건 이하로 사용하세요.");
|
|
|
|
|
|
|
+ throw new IllegalStateException("엑셀 파일의 건수를 " + EXCEL_ROW_COUNT + "건 이하로 사용하세요.");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
Collection<Goods> goodsList = new ArrayList<>();
|
|
Collection<Goods> goodsList = new ArrayList<>();
|
|
|
for (GagaMap map : ecxelGoodsList) {
|
|
for (GagaMap map : ecxelGoodsList) {
|
|
|
Goods tmpGoods = mapper.convertValue(map, Goods.class);
|
|
Goods tmpGoods = mapper.convertValue(map, Goods.class);
|
|
@@ -419,7 +419,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
// 정보고시 분류
|
|
// 정보고시 분류
|
|
|
mav.addObject("niClsfCdList", rendererService.getAvailCommonCodeList("G004"));
|
|
mav.addObject("niClsfCdList", rendererService.getAvailCommonCodeList("G004"));
|
|
|
// 사용자 브랜드 조회
|
|
// 사용자 브랜드 조회
|
|
|
- mav.addObject("authBrandList", rendererService.getAuthBrandList(TssSession.getInfo().getUserNo()));
|
|
|
|
|
|
|
+ mav.addObject("authBrandList", rendererService.getSupplyCompanyBrandList(TssSession.getInfo().getSupplyCompCd()));
|
|
|
// 상품타입
|
|
// 상품타입
|
|
|
mav.addObject("goodsTypeList", rendererService.getAvailCommonCodeList("G056"));
|
|
mav.addObject("goodsTypeList", rendererService.getAvailCommonCodeList("G056"));
|
|
|
// 상품구분
|
|
// 상품구분
|
|
@@ -615,7 +615,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
if (goodsImgInfo.getDefaultImgYn().equals("Y")) {
|
|
if (goodsImgInfo.getDefaultImgYn().equals("Y")) {
|
|
|
mav.addObject("defaultImgOrd", goodsImgInfo.getDispOrd());
|
|
mav.addObject("defaultImgOrd", goodsImgInfo.getDispOrd());
|
|
|
}
|
|
}
|
|
|
- if (goodsImgInfo.getMouseoverImgYn() .equals("Y")) {
|
|
|
|
|
|
|
+ if (goodsImgInfo.getMouseoverImgYn().equals("Y")) {
|
|
|
mav.addObject("mouseoverImgOrd", goodsImgInfo.getDispOrd());
|
|
mav.addObject("mouseoverImgOrd", goodsImgInfo.getDispOrd());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -626,11 +626,11 @@ public class TssGoodsController extends TssBaseController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
GoodsImg goodsModelInfo = goodsService.getGoodsModelInfo(goodsImg);
|
|
GoodsImg goodsModelInfo = goodsService.getGoodsModelInfo(goodsImg);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (goodsModelInfo != null) {
|
|
if (goodsModelInfo != null) {
|
|
|
- mav.addObject("modelInfo", goodsModelInfo.getModelInfo());
|
|
|
|
|
- }else {
|
|
|
|
|
- mav.addObject("modelInfo", "");
|
|
|
|
|
|
|
+ mav.addObject("modelInfo", goodsModelInfo.getModelInfo());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ mav.addObject("modelInfo", "");
|
|
|
}
|
|
}
|
|
|
mav.addObject("goodsImg", goodsImg);
|
|
mav.addObject("goodsImg", goodsImg);
|
|
|
mav.setViewName("goods/GoodsImageForm");
|
|
mav.setViewName("goods/GoodsImageForm");
|
|
@@ -664,10 +664,10 @@ public class TssGoodsController extends TssBaseController {
|
|
|
|
|
|
|
|
// 1.업로드된 파일 rename 및 순서 재정렬
|
|
// 1.업로드된 파일 rename 및 순서 재정렬
|
|
|
for (GoodsImg goodsImg : goodsImgList) {
|
|
for (GoodsImg goodsImg : goodsImgList) {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
goodsModelInfo.setGoodsCd(goodsImg.getGoodsCd());
|
|
goodsModelInfo.setGoodsCd(goodsImg.getGoodsCd());
|
|
|
goodsModelInfo.setModelInfo(goodsImg.getModelInfo());
|
|
goodsModelInfo.setModelInfo(goodsImg.getModelInfo());
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// dx5에서 삭제한 파일은 skip
|
|
// dx5에서 삭제한 파일은 skip
|
|
|
if (goodsImg.getMode().equals("D")) {
|
|
if (goodsImg.getMode().equals("D")) {
|
|
|
continue;
|
|
continue;
|
|
@@ -749,7 +749,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
|
|
|
|
|
// 상품이미지 저장 처리
|
|
// 상품이미지 저장 처리
|
|
|
goodsService.saveGoodsImageList(goodsImgList);
|
|
goodsService.saveGoodsImageList(goodsImgList);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 모델정보 처리
|
|
// 모델정보 처리
|
|
|
goodsModelInfo.setRegNo(TssSession.getInfo().getUserNo());
|
|
goodsModelInfo.setRegNo(TssSession.getInfo().getUserNo());
|
|
|
goodsModelInfo.setUpdNo(TssSession.getInfo().getUserNo());
|
|
goodsModelInfo.setUpdNo(TssSession.getInfo().getUserNo());
|
|
@@ -856,9 +856,9 @@ public class TssGoodsController extends TssBaseController {
|
|
|
|
|
|
|
|
//건수
|
|
//건수
|
|
|
if (ecxelGoodsList != null && ecxelGoodsList.size() > EXCEL_ROW_COUNT) {
|
|
if (ecxelGoodsList != null && ecxelGoodsList.size() > EXCEL_ROW_COUNT) {
|
|
|
- throw new IllegalStateException("엑셀 파일의 건수를 " +EXCEL_ROW_COUNT + "건 이하로 사용하세요.");
|
|
|
|
|
|
|
+ throw new IllegalStateException("엑셀 파일의 건수를 " + EXCEL_ROW_COUNT + "건 이하로 사용하세요.");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
for (GagaMap gagaMap : ecxelGoodsList) {
|
|
for (GagaMap gagaMap : ecxelGoodsList) {
|
|
|
goodsService.createExceluploadSelfGoods(gagaMap, goodsMass.getProcJob());
|
|
goodsService.createExceluploadSelfGoods(gagaMap, goodsMass.getProcJob());
|
|
|
}
|
|
}
|
|
@@ -867,7 +867,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
// 입점상품등록
|
|
// 입점상품등록
|
|
|
// DB 처리 시 사용되는 파라미터명(셀명) 설정 -
|
|
// DB 처리 시 사용되는 파라미터명(셀명) 설정 -
|
|
|
String[] goodsNames = {"supplyGoodsCd", "supplyCompCd", "brandCd", "goodsNm", "goodsTnm", "goodsSnm1", "itemkindCd",
|
|
String[] goodsNames = {"supplyGoodsCd", "supplyCompCd", "brandCd", "goodsNm", "goodsTnm", "goodsSnm1", "itemkindCd",
|
|
|
- "sexGb", "listPrice", "currPrice", "goodsGb", "formalGb", "originCd", "makeYmd", "taxGb", "ageGrpCd", "adultYn",
|
|
|
|
|
|
|
+ "sexGb", "listPrice", "currPrice", "goodsGb", "formalGb", "originCd", "makeYmd", "taxGb", "ageGrpCd", "adultYn",
|
|
|
"certNum", "optStr", "goodsContent",
|
|
"certNum", "optStr", "goodsContent",
|
|
|
"niClsfCd", "niContent1", "niContent2", "niContent3", "niContent4", "niContent5",
|
|
"niClsfCd", "niContent1", "niContent2", "niContent3", "niContent4", "niContent5",
|
|
|
"niContent6", "niContent7", "niContent8", "niContent9", "niContent10", "niContent11", "niContent12",
|
|
"niContent6", "niContent7", "niContent8", "niContent9", "niContent10", "niContent11", "niContent12",
|
|
@@ -881,9 +881,9 @@ public class TssGoodsController extends TssBaseController {
|
|
|
if (ecxelGoodsList != null && ecxelGoodsList.size() > 100) { //안전인증 로직 추가로 건수 줄임
|
|
if (ecxelGoodsList != null && ecxelGoodsList.size() > 100) { //안전인증 로직 추가로 건수 줄임
|
|
|
throw new IllegalStateException("엑셀 파일의 건수를 100 건 이하로 사용하세요.");
|
|
throw new IllegalStateException("엑셀 파일의 건수를 100 건 이하로 사용하세요.");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 사용자의 관리 브랜드 조회
|
|
// 사용자의 관리 브랜드 조회
|
|
|
- Collection<CommonCode> mdBrandList = rendererService.getAuthBrandList(TssSession.getInfo().getUserNo());
|
|
|
|
|
|
|
+ Collection<CommonCode> mdBrandList = rendererService.getSupplyCompanyBrandList(TssSession.getInfo().getSupplyCompCd());
|
|
|
|
|
|
|
|
if ("G001_B000".equals(TssSession.getInfo().getRoleCd())) {
|
|
if ("G001_B000".equals(TssSession.getInfo().getRoleCd())) {
|
|
|
if (mdBrandList == null || mdBrandList.isEmpty()) {
|
|
if (mdBrandList == null || mdBrandList.isEmpty()) {
|
|
@@ -925,8 +925,8 @@ public class TssGoodsController extends TssBaseController {
|
|
|
// DB 처리 시 사용되는 파라미터명(셀명) 설정 -
|
|
// DB 처리 시 사용되는 파라미터명(셀명) 설정 -
|
|
|
String[] goodsNames = {"goodsCd", "goodsNm", "goodsTnm", "goodsSnm1", "itemkindCd", "seasonCd",
|
|
String[] goodsNames = {"goodsCd", "goodsNm", "goodsTnm", "goodsSnm1", "itemkindCd", "seasonCd",
|
|
|
"sexGb", "currPrice", "sellFeeRate", "goodsGb", "formalGb", "minOrdQty", "maxOrdQty", "dayMaxOrdQty",
|
|
"sexGb", "currPrice", "sellFeeRate", "goodsGb", "formalGb", "minOrdQty", "maxOrdQty", "dayMaxOrdQty",
|
|
|
- "giftPackYn", "newCustOrdYn","pntPrate","prePpntUsableYn", "pntMrate","preMpntUsableYn",
|
|
|
|
|
- "returnableYn", "changeableYn","taxGb", "ageGrpCd", "adultYn", "delvFeeCd", "optStr","goodsContent",
|
|
|
|
|
|
|
+ "giftPackYn", "newCustOrdYn", "pntPrate", "prePpntUsableYn", "pntMrate", "preMpntUsableYn",
|
|
|
|
|
+ "returnableYn", "changeableYn", "taxGb", "ageGrpCd", "adultYn", "delvFeeCd", "optStr", "goodsContent",
|
|
|
"niClsfCd", "niContent1", "niContent2",
|
|
"niClsfCd", "niContent1", "niContent2",
|
|
|
"niContent3", "niContent4", "niContent5", "niContent6", "niContent7", "niContent8", "niContent9",
|
|
"niContent3", "niContent4", "niContent5", "niContent6", "niContent7", "niContent8", "niContent9",
|
|
|
"niContent10", "niContent11", "niContent12", "niContent13", "niContent14", "niContent15", "niContent16",
|
|
"niContent10", "niContent11", "niContent12", "niContent13", "niContent14", "niContent15", "niContent16",
|
|
@@ -942,9 +942,9 @@ public class TssGoodsController extends TssBaseController {
|
|
|
|
|
|
|
|
//건수
|
|
//건수
|
|
|
if (ecxelGoodsList != null && ecxelGoodsList.size() > EXCEL_ROW_COUNT) {
|
|
if (ecxelGoodsList != null && ecxelGoodsList.size() > EXCEL_ROW_COUNT) {
|
|
|
- throw new IllegalStateException("엑셀 파일의 건수를 " +EXCEL_ROW_COUNT + "건 이하로 사용하세요.");
|
|
|
|
|
|
|
+ throw new IllegalStateException("엑셀 파일의 건수를 " + EXCEL_ROW_COUNT + "건 이하로 사용하세요.");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
for (GagaMap gagaMap : ecxelGoodsList) {
|
|
for (GagaMap gagaMap : ecxelGoodsList) {
|
|
|
goodsService.updateMassExceluploadGoods(gagaMap, goodsMass.getProcJob());
|
|
goodsService.updateMassExceluploadGoods(gagaMap, goodsMass.getProcJob());
|
|
|
}
|
|
}
|
|
@@ -1205,7 +1205,6 @@ public class TssGoodsController extends TssBaseController {
|
|
|
return super.ok(message.getMessage("SUCC_0001"));
|
|
return super.ok(message.getMessage("SUCC_0001"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 사은품 화면
|
|
* 사은품 화면
|
|
|
* @return
|
|
* @return
|
|
@@ -1321,15 +1320,15 @@ public class TssGoodsController extends TssBaseController {
|
|
|
String selfYn = "N";
|
|
String selfYn = "N";
|
|
|
String supplyCompCd = TssSession.getInfo().getSupplyCompCd();
|
|
String supplyCompCd = TssSession.getInfo().getSupplyCompCd();
|
|
|
mav.addObject("supplyCompList", rendererService.getSupplyCompanyList(supplyCompCd, selfYn));
|
|
mav.addObject("supplyCompList", rendererService.getSupplyCompanyList(supplyCompCd, selfYn));
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
SupplyCompany supplyCompany = new SupplyCompany();
|
|
SupplyCompany supplyCompany = new SupplyCompany();
|
|
|
supplyCompany.setSupplyCompCd(supplyCompCd);
|
|
supplyCompany.setSupplyCompCd(supplyCompCd);
|
|
|
- Collection<SupplyCompany> supplyCompanyInfoList = businessService.getSupplyCompanyList(supplyCompany);
|
|
|
|
|
|
|
+ Collection<SupplyCompany> supplyCompanyInfoList = businessService.getSupplyCompanyList(supplyCompany);
|
|
|
mav.addObject("supplyCompanyInfo", supplyCompanyInfoList.iterator().next());
|
|
mav.addObject("supplyCompanyInfo", supplyCompanyInfoList.iterator().next());
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 배송비정보
|
|
// 배송비정보
|
|
|
mav.addObject("delvFeeCdList", rendererService.getSupplyDeliveryFeePolicyList(supplyCompCd));
|
|
mav.addObject("delvFeeCdList", rendererService.getSupplyDeliveryFeePolicyList(supplyCompCd));
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
String[] goodsStatExceptCds = {"G008_00"};
|
|
String[] goodsStatExceptCds = {"G008_00"};
|
|
|
mav.addObject("goodsStatList", rendererService.getCommonCodeList("G008", "Y", goodsStatExceptCds));
|
|
mav.addObject("goodsStatList", rendererService.getCommonCodeList("G008", "Y", goodsStatExceptCds));
|
|
|
|
|
|
|
@@ -1346,13 +1345,13 @@ public class TssGoodsController extends TssBaseController {
|
|
|
// 정보고시 분류
|
|
// 정보고시 분류
|
|
|
mav.addObject("niClsfCdList", rendererService.getAvailCommonCodeList("G004"));
|
|
mav.addObject("niClsfCdList", rendererService.getAvailCommonCodeList("G004"));
|
|
|
// 사용자 브랜드 조회
|
|
// 사용자 브랜드 조회
|
|
|
- mav.addObject("authBrandList", rendererService.getAuthBrandList(TssSession.getInfo().getUserNo()));
|
|
|
|
|
|
|
+ mav.addObject("authBrandList", rendererService.getSupplyCompanyBrandList(TssSession.getInfo().getSupplyCompCd()));
|
|
|
// 상품타입
|
|
// 상품타입
|
|
|
mav.addObject("goodsTypeList", rendererService.getAvailCommonCodeList("G056"));
|
|
mav.addObject("goodsTypeList", rendererService.getAvailCommonCodeList("G056"));
|
|
|
// 상품구분
|
|
// 상품구분
|
|
|
mav.addObject("goodsGbList", rendererService.getAvailCommonCodeList("G073"));
|
|
mav.addObject("goodsGbList", rendererService.getAvailCommonCodeList("G073"));
|
|
|
// 유통구분
|
|
// 유통구분
|
|
|
- String[] distributionGbExceptCds = {"G065_10","G065_11","G065_12"};
|
|
|
|
|
|
|
+ String[] distributionGbExceptCds = {"G065_10", "G065_11", "G065_12"};
|
|
|
mav.addObject("distributionGbList", rendererService.getCommonCodeList("G065", "Y", distributionGbExceptCds));
|
|
mav.addObject("distributionGbList", rendererService.getCommonCodeList("G065", "Y", distributionGbExceptCds));
|
|
|
// 상품연령대
|
|
// 상품연령대
|
|
|
mav.addObject("ageGrpCdList", rendererService.getAvailCommonCodeList("G023"));
|
|
mav.addObject("ageGrpCdList", rendererService.getAvailCommonCodeList("G023"));
|
|
@@ -1369,7 +1368,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
|
|
|
|
|
return mav;
|
|
return mav;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 상품의 정보고시 항목 목록
|
|
* 상품의 정보고시 항목 목록
|
|
|
*
|
|
*
|
|
@@ -1383,7 +1382,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
public Collection<NotiInfo> getNotiInfoItemList(NotiInfo notiInfo) {
|
|
public Collection<NotiInfo> getNotiInfoItemList(NotiInfo notiInfo) {
|
|
|
return goodsService.getNotiInfoItemList(notiInfo);
|
|
return goodsService.getNotiInfoItemList(notiInfo);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 입점 상품 등록
|
|
* 입점 상품 등록
|
|
|
*
|
|
*
|
|
@@ -1406,7 +1405,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
goods.setNotiListNew(notiList);
|
|
goods.setNotiListNew(notiList);
|
|
|
|
|
|
|
|
goodsService.createGoodsDetail(goods);
|
|
goodsService.createGoodsDetail(goods);
|