|
@@ -1251,6 +1251,31 @@ public class TssGoodsService {
|
|
|
|
|
|
|
|
this.createGoodsNoti(gagaMap, goodsNotiList); // 상품고시정보 저장
|
|
this.createGoodsNoti(gagaMap, goodsNotiList); // 상품고시정보 저장
|
|
|
|
|
|
|
|
|
|
+ GoodsDesc goodsDesc = new GoodsDesc();
|
|
|
|
|
+ goodsDesc.setGoodsCd(goods.getGoodsCd());
|
|
|
|
|
+ goodsDesc.setRegNo(goods.getRegNo());
|
|
|
|
|
+ goodsDesc.setUpdNo(goods.getUpdNo());
|
|
|
|
|
+ // 상품상세 타이틀 확인
|
|
|
|
|
+ if (!StringUtils.isBlank(goodsMass.getGoodsTitles())) {
|
|
|
|
|
+ goodsDesc.setDescGb("10");
|
|
|
|
|
+ goodsDesc.setGoodsDesc(goodsMass.getGoodsTitles().trim());
|
|
|
|
|
+ this.saveGoodsDesc(goodsDesc);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 상품상세 타이틀 내용 확인
|
|
|
|
|
+ if (!StringUtils.isBlank(goodsMass.getGoodsContent())) {
|
|
|
|
|
+ goodsDesc.setDescGb("20");
|
|
|
|
|
+ goodsDesc.setGoodsDesc(goodsMass.getGoodsContent().trim());
|
|
|
|
|
+ this.saveGoodsDesc(goodsDesc);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 상품상세 상품 상세 특징 확인
|
|
|
|
|
+ if (!StringUtils.isBlank(goodsMass.getGoodsCharacter())) {
|
|
|
|
|
+ goodsDesc.setDescGb("30");
|
|
|
|
|
+ goodsDesc.setGoodsDesc(goodsMass.getGoodsCharacter().trim());
|
|
|
|
|
+ this.saveGoodsDesc(goodsDesc);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 사용자 검색어를 검색어에 적용
|
|
// 사용자 검색어를 검색어에 적용
|
|
|
String goodsSnm = goodsDao.getGoodsSnm(goods.getGoodsCd());
|
|
String goodsSnm = goodsDao.getGoodsSnm(goods.getGoodsCd());
|
|
|
if (!StringUtils.isBlank(goods.getGoodsSnm1())) {
|
|
if (!StringUtils.isBlank(goods.getGoodsSnm1())) {
|
|
@@ -1408,63 +1433,64 @@ public class TssGoodsService {
|
|
|
return goods;
|
|
return goods;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 정상가
|
|
|
|
|
- if (StringUtils.isBlank(goodsMass.getListPrice())) {
|
|
|
|
|
- goods.setGoodsRegMsg("정상가 오류");
|
|
|
|
|
- goods.setGoodsStat("10");
|
|
|
|
|
- return goods;
|
|
|
|
|
- }
|
|
|
|
|
- if (!GagaStringUtil.replace(goodsMass.getListPrice().trim(), ",", "").trim().matches(NUMBER_PATTERN)) {
|
|
|
|
|
- goods.setGoodsRegMsg("정상가 오류");
|
|
|
|
|
- goods.setGoodsStat("10");
|
|
|
|
|
- return goods;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 판매가
|
|
|
|
|
- if (StringUtils.isBlank(goodsMass.getCurrPrice())) {
|
|
|
|
|
- goods.setGoodsRegMsg("판매가 오류");
|
|
|
|
|
- goods.setGoodsStat("10");
|
|
|
|
|
- return goods;
|
|
|
|
|
- }
|
|
|
|
|
- if (!GagaStringUtil.replace(goodsMass.getCurrPrice().trim(), ",", "").trim().matches(NUMBER_PATTERN)) {
|
|
|
|
|
- goods.setGoodsRegMsg("판매가 오류");
|
|
|
|
|
- goods.setGoodsStat("10");
|
|
|
|
|
- return goods;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- int listPrice = Integer.parseInt(GagaStringUtil.replace(goodsMass.getListPrice().trim(), ",", ""));
|
|
|
|
|
- int currPrice = Integer.parseInt(GagaStringUtil.replace(goodsMass.getCurrPrice().trim(), ",", ""));
|
|
|
|
|
-
|
|
|
|
|
- if (currPrice > listPrice) {
|
|
|
|
|
- goods.setGoodsRegMsg("판매가 오류");
|
|
|
|
|
- goods.setGoodsStat("10");
|
|
|
|
|
- return goods;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// // 정상가
|
|
|
|
|
+// if (StringUtils.isBlank(goodsMass.getListPrice())) {
|
|
|
|
|
+// goods.setGoodsRegMsg("정상가 오류");
|
|
|
|
|
+// goods.setGoodsStat("10");
|
|
|
|
|
+// return goods;
|
|
|
|
|
+// }
|
|
|
|
|
+// if (!GagaStringUtil.replace(goodsMass.getListPrice().trim(), ",", "").trim().matches(NUMBER_PATTERN)) {
|
|
|
|
|
+// goods.setGoodsRegMsg("정상가 오류");
|
|
|
|
|
+// goods.setGoodsStat("10");
|
|
|
|
|
+// return goods;
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// // 판매가
|
|
|
|
|
+// if (StringUtils.isBlank(goodsMass.getCurrPrice())) {
|
|
|
|
|
+// goods.setGoodsRegMsg("판매가 오류");
|
|
|
|
|
+// goods.setGoodsStat("10");
|
|
|
|
|
+// return goods;
|
|
|
|
|
+// }
|
|
|
|
|
+// if (!GagaStringUtil.replace(goodsMass.getCurrPrice().trim(), ",", "").trim().matches(NUMBER_PATTERN)) {
|
|
|
|
|
+// goods.setGoodsRegMsg("판매가 오류");
|
|
|
|
|
+// goods.setGoodsStat("10");
|
|
|
|
|
+// return goods;
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// int listPrice = Integer.parseInt(GagaStringUtil.replace(goodsMass.getListPrice().trim(), ",", ""));
|
|
|
|
|
+// int currPrice = Integer.parseInt(GagaStringUtil.replace(goodsMass.getCurrPrice().trim(), ",", ""));
|
|
|
|
|
+//
|
|
|
|
|
+// if (currPrice > listPrice) {
|
|
|
|
|
+// goods.setGoodsRegMsg("판매가 오류");
|
|
|
|
|
+// goods.setGoodsStat("10");
|
|
|
|
|
+// return goods;
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
// 정상가
|
|
// 정상가
|
|
|
- goods.setListPrice(listPrice);
|
|
|
|
|
|
|
+ goods.setListPrice(0); // 기본처리
|
|
|
// 판매가
|
|
// 판매가
|
|
|
- goods.setCurrPrice(currPrice);
|
|
|
|
|
|
|
+ goods.setCurrPrice(0); // 기본처리
|
|
|
|
|
|
|
|
// 원가
|
|
// 원가
|
|
|
|
|
+ goods.setCostPrice(0); // 기본처리
|
|
|
// FRJ 필수 확인
|
|
// FRJ 필수 확인
|
|
|
- if ("S006".equals(goods.getBrandCd())) {
|
|
|
|
|
- if (StringUtils.isBlank(goodsMass.getCostPrice())) {
|
|
|
|
|
- goods.setGoodsRegMsg("원가 오류");
|
|
|
|
|
- goods.setGoodsStat("10");
|
|
|
|
|
- return goods;
|
|
|
|
|
- }
|
|
|
|
|
- if (!GagaStringUtil.replace(goodsMass.getCostPrice().trim(), ",", "").matches(NUMBER_PATTERN)) {
|
|
|
|
|
- goods.setGoodsRegMsg("원가 오류");
|
|
|
|
|
- goods.setGoodsStat("10");
|
|
|
|
|
- return goods;
|
|
|
|
|
- }
|
|
|
|
|
- int costPrice = Integer.parseInt(GagaStringUtil.replace(goodsMass.getCostPrice().trim(), ",", ""));
|
|
|
|
|
- // 원가
|
|
|
|
|
- goods.setCostPrice(costPrice);
|
|
|
|
|
- } else {
|
|
|
|
|
- goods.setCostPrice(0);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if ("S006".equals(goods.getBrandCd())) {
|
|
|
|
|
+// if (StringUtils.isBlank(goodsMass.getCostPrice())) {
|
|
|
|
|
+// goods.setGoodsRegMsg("원가 오류");
|
|
|
|
|
+// goods.setGoodsStat("10");
|
|
|
|
|
+// return goods;
|
|
|
|
|
+// }
|
|
|
|
|
+// if (!GagaStringUtil.replace(goodsMass.getCostPrice().trim(), ",", "").matches(NUMBER_PATTERN)) {
|
|
|
|
|
+// goods.setGoodsRegMsg("원가 오류");
|
|
|
|
|
+// goods.setGoodsStat("10");
|
|
|
|
|
+// return goods;
|
|
|
|
|
+// }
|
|
|
|
|
+// int costPrice = Integer.parseInt(GagaStringUtil.replace(goodsMass.getCostPrice().trim(), ",", ""));
|
|
|
|
|
+// // 원가
|
|
|
|
|
+// goods.setCostPrice(costPrice);
|
|
|
|
|
+// } else {
|
|
|
|
|
+// goods.setCostPrice(0);
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
// 정상이월
|
|
// 정상이월
|
|
|
if (StringUtils.isBlank(goodsMass.getFormalGb())) {
|
|
if (StringUtils.isBlank(goodsMass.getFormalGb())) {
|
|
@@ -1568,6 +1594,33 @@ public class TssGoodsService {
|
|
|
return goods;
|
|
return goods;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 상품상세 타이틀 확인
|
|
|
|
|
+ if (!StringUtils.isBlank(goodsMass.getGoodsTitles())) {
|
|
|
|
|
+ if (goodsMass.getGoodsTitles().toLowerCase().indexOf("script") >= 0) {
|
|
|
|
|
+ goods.setGoodsRegMsg("상품타이틀 script 선언 오류");
|
|
|
|
|
+ goods.setGoodsStat("10");
|
|
|
|
|
+ return goods;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 상품상세 타이틀 내용 확인
|
|
|
|
|
+ if (!StringUtils.isBlank(goodsMass.getGoodsContent())) {
|
|
|
|
|
+ if (goodsMass.getGoodsContent().toLowerCase().indexOf("script") >= 0) {
|
|
|
|
|
+ goods.setGoodsRegMsg("상품타이틀 내용 script 선언 오류");
|
|
|
|
|
+ goods.setGoodsStat("10");
|
|
|
|
|
+ return goods;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 상품상세 상품 상세 특징 확인
|
|
|
|
|
+ if (!StringUtils.isBlank(goodsMass.getGoodsCharacter())) {
|
|
|
|
|
+ if (goodsMass.getGoodsCharacter().toLowerCase().indexOf("script") >= 0) {
|
|
|
|
|
+ goods.setGoodsRegMsg("상세 특징 내용 script 선언 오류");
|
|
|
|
|
+ goods.setGoodsStat("10");
|
|
|
|
|
+ return goods;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
goods.setGoodsType("G056_N"); //상품타입
|
|
goods.setGoodsType("G056_N"); //상품타입
|
|
|
goods.setFormalGb("G009_10"); // 정상이월 구분
|
|
goods.setFormalGb("G009_10"); // 정상이월 구분
|
|
|
goods.setGoodsGb("G073_11"); //상품구분
|
|
goods.setGoodsGb("G073_11"); //상품구분
|
|
@@ -2292,6 +2345,8 @@ public class TssGoodsService {
|
|
|
goods.setSelfMallYn("Y"); //자사몰 노출여부
|
|
goods.setSelfMallYn("Y"); //자사몰 노출여부
|
|
|
goods.setErpStockLinkYn("N"); // ERP재고연동여부
|
|
goods.setErpStockLinkYn("N"); // ERP재고연동여부
|
|
|
goods.setMainColorCd("XX"); // 무의미 데이터
|
|
goods.setMainColorCd("XX"); // 무의미 데이터
|
|
|
|
|
+ goods.setTobeFormYn("Y"); // 자사 신규 기본값
|
|
|
|
|
+ goods.setTobeFormYn("N"); // 입점 신규 기본값
|
|
|
|
|
|
|
|
return goods;
|
|
return goods;
|
|
|
}
|
|
}
|