Przeglądaj źródła

자사상품 대량등록 양식 변경

eskim 5 lat temu
rodzic
commit
6476f421da

+ 4 - 3
src/main/java/com/style24/persistence/domain/Goods.java

@@ -76,6 +76,7 @@ public class Goods extends TscBaseDomain {
 	private String newCustOrdYn;		//신규고객 구매가능여부(Y:신규고객만 구매가능)
 	private int costPrice;		//원가
 	private String adultYn;		//성인용품여부
+	private String tobeFormYn;		//상품상세신규폼사용여부
 	private String sellStdt;		//판매시작일시
 	private String sellStYMD;		//판매시작일
 	private String sellStHH;		//판매시작시
@@ -93,9 +94,9 @@ public class Goods extends TscBaseDomain {
 	private String goodsPcDownDesc;
 	private String goodsMobileTopDesc;
 	private String goodsMobileDownDesc;
-	private String goodsTitlesDesc;
-	private String goodsContentsDesc;
-	private String goodsCharacterDesc;
+	private String goodsTitlesDesc;		//상품 상세 타이틀
+	private String goodsContentsDesc;	//상품 상세 내용
+	private String goodsCharacterDesc;	//상품 상세 특징
 	private String chkDescKeep = "N";
 //
 	private String chDataYn = "N";

+ 3 - 0
src/main/java/com/style24/persistence/domain/GoodsMass.java

@@ -58,6 +58,9 @@ public class GoodsMass extends TscBaseDomain {
 	private String opt1Str;			//옵션1
 	private String opt2Str;			//옵션2
 	private String goodsContent;	//상품상세 html(입점용)
+	private String goodsTitles;		//상품 상세 타이틀
+	private String goodsCharacter;	//상품 상세 특징
+	
 
 	private String niClsfCd;
 	private String niContent1;

+ 2 - 0
src/main/java/com/style24/persistence/mybatis/shop/TssGoods.xml

@@ -1190,6 +1190,7 @@
 		  , TAX_GB
 		  , ERP_STOCK_LINK_YN
 		  , ADULT_YN
+		  , TOBE_FORM_YN
 		  , REG_NO
 		  , REG_DT
 		  , UPD_NO
@@ -1234,6 +1235,7 @@
 		  , #{taxGb}
 		  , IFNULL(#{erpStockLinkYn},'N')
 		  , IFNULL(#{adultYn},'N')
+		  , IFNULL(#{tobeFormYn},'N')
 		  , #{regNo}
 		  , NOW()
 		  , #{updNo}

+ 106 - 51
src/main/java/com/style24/scm/biz/service/TssGoodsService.java

@@ -1251,6 +1251,31 @@ public class TssGoodsService {
 
 		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());
 		if (!StringUtils.isBlank(goods.getGoodsSnm1())) {
@@ -1408,63 +1433,64 @@ public class TssGoodsService {
 			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 필수 확인
-		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())) {
@@ -1568,6 +1594,33 @@ public class TssGoodsService {
 			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.setFormalGb("G009_10"); // 정상이월 구분
 		goods.setGoodsGb("G073_11"); //상품구분
@@ -2292,6 +2345,8 @@ public class TssGoodsService {
 		goods.setSelfMallYn("Y"); //자사몰 노출여부
 		goods.setErpStockLinkYn("N"); // ERP재고연동여부
 		goods.setMainColorCd("XX"); // 무의미 데이터
+		goods.setTobeFormYn("Y"); // 자사 신규 기본값
+		goods.setTobeFormYn("N"); // 입점 신규 기본값
 
 		return goods;
 	}

+ 1 - 1
src/main/java/com/style24/scm/biz/web/TssGoodsController.java

@@ -844,7 +844,7 @@ public class TssGoodsController extends TssBaseController {
 
 			// DB 처리 시 사용되는 파라미터명(셀명) 설정
 			String[] goodsNames = {"goodsNum", "brandCd", "goodsNm", "itemkindCd", "styleYear", "seasonCd",
-				"sexGb", "listPrice", "currPrice", "costPrice", "formalGb", "originCd", "makeYmd",
+				"sexGb", "formalGb", "originCd", "makeYmd", "goodsTitles", "goodsContents", "goodsCharacter",
 				"niClsfCd", "niContent1", "niContent2", "niContent3", "niContent4", "niContent5",
 				"niContent6", "niContent7", "niContent8", "niContent9", "niContent10", "niContent11", "niContent12",
 				"niContent13", "niContent14", "niContent15", "niContent16", "niContent17", "niContent18",

+ 1 - 0
src/main/webapp/WEB-INF/views/goods/GoodsRegisterForm.html

@@ -31,6 +31,7 @@
 				<input type="hidden" id="mainColorCd" name="mainColorCd" value="XX"/>
 				<input type="hidden" id="selfGoodsYn" name="selfGoodsYn" value="N"/>
 				<input type="hidden" id="goodsType" name="goodsType" value="G056_N"/>
+				<input type="hidden" id="tobeFormYn" name="tobeFormYn" value="N"/>
 				<input type="hidden" id="pntPrate10" name="pntPrate10" />
 				<input type="hidden" id="pntPrate20" name="pntPrate20" />
 				<input type="hidden" id="pntMrate10" name="pntMrate10" />