소스 검색

상품대량등록-상품상태,정상가 추가

jmh 4 년 전
부모
커밋
9771a0c858

+ 21 - 0
src/main/java/com/style24/admin/biz/service/TsaGoodsService.java

@@ -3095,6 +3095,27 @@ public class TsaGoodsService {
 			}
 			goods.setChDataYn("Y");
 		}
+		
+		// 상품상태
+		if (StringUtils.isBlank(goodsMass.getGoodsStatCd())) {
+			goods.setGoodsRegMsg("상품상태 오류");
+			goods.setGoodsStat("10");
+			return goods;
+		}
+		goods.setGoodsStatCd(goodsMass.getGoodsStatCd().trim().toUpperCase());
+		// 상품상태
+		if (!UPDATE_NO_PATTERN.equals(goods.getGoodsStatCd())) {
+			commonCode.setCdGb("G008"); // 상품상태
+			commonCode.setCd(goods.getGoodsStatCd());
+			Collection<CommonCode> statList = rendererService.getCommonCodeList(commonCode);
+			if (statList == null || statList.isEmpty()) {
+				goods.setGoodsRegMsg("상품상태 오류");
+				goods.setGoodsStat("10");
+				return goods;
+			}
+			goods.setChDataYn("Y");
+		}
+		
 		//판매가
 		if (StringUtils.isBlank(goodsMass.getCurrPrice())) {
 			goods.setGoodsRegMsg("판매가 오류");

+ 1 - 1
src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

@@ -3083,7 +3083,7 @@ public class TsaGoodsController extends TsaBaseController {
 		// 상품수장
 		// DB 처리 시 사용되는 파라미터명(셀명) 설정 -
 		String[] goodsNames = {"goodsCd", "goodsNm", "goodsTnm", "goodsSnm1", "itemkindCd", "seasonCd",
-			"sexGb", "currPrice", "sellFeeRate", "goodsGb", "formalGb", "minOrdQty", "maxOrdQty", "dayMaxOrdQty",
+			"sexGb", "goodsStatCd", "listPrice", "currPrice", "sellFeeRate", "goodsGb", "formalGb", "minOrdQty", "maxOrdQty", "dayMaxOrdQty",
 			"giftPackYn", "newCustOrdYn", "pntPrate", "prePpntUsableYn", "pntMrate", "preMpntUsableYn",
 			"returnableYn", "changeableYn", "taxGb", "ageGrpCd", "adultYn", "delvFeeCd", "optStr", "goodsContent",
 			"niClsfCd", "niContent1", "niContent2",

+ 1 - 0
src/main/java/com/style24/persistence/domain/Goods.java

@@ -40,6 +40,7 @@ public class Goods extends TscBaseDomain {
 	private float dcRate;		//할인율
 	private int benefitPrice;		//즉시할인판매가
 	private String goodsStat;		//상품상태(공통코드G008)
+	private String goodsStatCd;		//상품상태명(공통코드G008)-상품대량등록시 goodsStat를 다른용도로 사용하고 있으므로, 상품상태 코드값 추가필요
 	private String selfMallYn;		//자사몰노출여부
 	private String goodsGb;			//해외구매대행/병행수입 상품일 경우 주문 시 통관부호 입력 란이 추가되어야 한다
 	private String foreignBuyYn;		//해외구매대행여부

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

@@ -97,6 +97,7 @@ public class GoodsMass extends TscBaseDomain {
 	private String regSuccYn;
 	private String regFailRsn;
 	private String goodsStat;		//상품상태(공통코드G008)
+	private String goodsStatCd;		//상품상태(공통코드G008)-상품대량등록시 goodsStat를 다른용도로 사용하고 있으므로, 상품상태 코드값 추가필요
 
 	private String mainColorCd;
 

+ 9 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -4506,6 +4506,7 @@
 		  , SEASON_CD
 		  , SEX_GB
 		  , GOODS_NUM
+		  , GOODS_STAT_CD
 		  , LIST_PRICE
 		  , CURR_PRICE
 		  , COST_PRICE
@@ -4577,6 +4578,7 @@
 		  , #{seasonCd}
 		  , #{sexGb}
 		  , #{goodsNum}
+		  , #{goodsStatCd}
 		  , #{listPrice}
 		  , #{currPrice}
 		  , #{costPrice}
@@ -4659,6 +4661,12 @@
 		<if test='sexGb != null and sexGb != "X"'>
 		  , SEX_GB = #{sexGb}
 		</if>
+		<if test='goodsStatCd != null and goodsStatCd != "X"'>
+		  , GOODS_STAT = #{goodsStatCd}
+		</if>
+		<if test="listPrice != null and listPrice > 0">
+		  , LIST_PRICE = #{listPrice}
+		</if>
 		<if test="currPrice != null and currPrice > 0">
 		  , CURR_PRICE = #{currPrice}
 		  , CURR_BPRICE = #{currBprice}
@@ -4739,6 +4747,7 @@
 		     , A.SEASON_CD
 		     , A.SEX_GB
 		     , A.GOODS_NUM
+		     , A.GOODS_STAT_CD
 		     , A.LIST_PRICE
 		     , A.CURR_PRICE
 		     , A.COST_PRICE

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

@@ -143,6 +143,7 @@
 		{headerName: "스타일연도", field: "styleYear", width: 100, cellClass: 'text-center'},
 		{headerName: "시즌", field: "seasonCd", width: 100, cellClass: 'text-center'},
 		{headerName: "성별", field: "sexGb", width: 100, cellClass: 'text-center'},
+		{headerName: "상품상태", field: "goodsStatCd", width: 100, cellClass: 'text-center'},	
 		{headerName: "정상가", field: "listPrice", width: 100, cellClass: 'text-center'},
 		{headerName: "판매가", field: "currPrice", width: 100, cellClass: 'text-center'},
 		{headerName: "원가", field: "costPrice", width: 100, cellClass: 'text-center'},