Ver Fonte

상품 이미지 관련 수정

eskim há 5 anos atrás
pai
commit
bdc2f5d143

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

@@ -1510,18 +1510,18 @@ public class TsaGoodsService {
 //		goodsDao.saveGoodsImgInfo(goodsImg);
 	}
 
-	/**
-	 * 품 이미지 경로생성
-	 *
-	 * @param goodsCd
-	 * @param brandCd
-	 * @return String
-	 * @author eskim
-	 * @since 2020. 10. 30
-	 */
-	private String getGoodsImgPath(String goodsCd, String brandCd) {
-		return "/" + goodsCd.substring(0, 1) + "/" + goodsCd.substring(0, 3) + "/" + goodsCd + "/1000/" + goodsCd + "_";
-	}
+//	/**
+//	 * 품 이미지 경로생성
+//	 *
+//	 * @param goodsCd
+//	 * @param brandCd
+//	 * @return String
+//	 * @author eskim
+//	 * @since 2020. 10. 30
+//	 */
+//	private String getGoodsImgPath(String goodsCd, String brandCd) {
+//		return "/" + goodsCd.substring(0, 1) + "/" + goodsCd.substring(0, 3) + "/" + goodsCd + "/1000/" + goodsCd + "_";
+//	}
 
 	/**
 	 * 상품 코드 생성

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

@@ -98,11 +98,7 @@ public class Goods extends TscBaseDomain {
 	private String goodsStatOrg;
 	private String formalGbOrg;
 
-	//private String imgType;
-	//private String imgPath1;
-	//private String imgPath6;
 	private String sysImgNm;
-
 	private String niClsfNm;
 	private String goodsTypeNm;
 	private String goodTnmInit;

+ 1 - 3
style24.admin/src/main/java/com/style24/persistence/domain/GoodsCompose.java

@@ -28,9 +28,7 @@ public class GoodsCompose extends TscBaseDomain {
 	private int compsCurrPriceOrg;
 	private int currPrice;
 	private String goodsStat;
-	private String imgPath1;
-	private String imgPath6;
-	private String imgType;
+	private String sysImgNm;
 	private String crud;
 	private String compsGoodsNm;
 

+ 9 - 31
style24.admin/src/main/java/com/style24/persistence/domain/GoodsImg.java

@@ -15,37 +15,6 @@ public class GoodsImg extends TscBaseDomain {
 
 	private String goodsCd;
 	private String colorCd;
-	private String imgType;
-	private String imgPath1;
-	private String imgPath2;
-	private String imgPath3;
-	private String imgPath4;
-	private String imgPath5;
-	private String imgPath6;
-	private String imgPath7;
-	private String imgPath8;
-	private String imgPath9;
-	private String imgPath10;
-	private String imgPath11;
-	private String imgPath12;
-	private String imgPath13;
-	private String imgPath14;
-	private String imgPath15;
-	private String imgPath16;
-	private String imgPath17;
-	private String imgPath18;
-	private String imgPath19;
-	private String imgPath20;
-
-	private String goodsImgPath;
-	private String col;
-	private String mainColorCd;
-	private String mainColorYn;
-	private String colorEnm;
-	private String optCd1;
-
-
-	//dext 5 용도
 	private int dispOrd;
 	private String orgImgNm;
 	private String sysImgNm;
@@ -56,4 +25,13 @@ public class GoodsImg extends TscBaseDomain {
 	private String sysImgUrl;
 	private int brandNo;
 
+	private String goodsImgPath;
+	private String col;
+	private String mainColorCd;
+	private String mainColorYn;
+	private String colorEnm;
+	private String optCd1;
+
+
+
 }

+ 1 - 3
style24.admin/src/main/java/com/style24/persistence/domain/ReinboundInform.java

@@ -30,9 +30,7 @@ public class ReinboundInform extends TscBaseDomain {
 	private String custNm;
 	private String cellPhnno;
 	private String goodsStat;
-	private String imgType;
-	private String imgPath1;
-	private String imgPath6;
+	private String sysImgNm;
 	private int currStockQty;
 	private String soldoutYn;
 

+ 1 - 1
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -1424,7 +1424,7 @@
 		     , NVL(A.OPT_CD1, A.MAIN_COLOR_CD) AS OPT_CD1
 		     , A.MAIN_COLOR_CD
 		     , IF(A.MAIN_COLOR_CD = NVL(A.OPT_CD1, A.MAIN_COLOR_CD), 'Y','N') AS  MAIN_COLOR_YN
-		     , (SELECT MAX(SYS_IMG_NM) FROM TB_GOODS_IMG  WHERE GOODS_CD = A.GOODS_CD AND COLOR_CD = A.MAIN_COLOR_CD AND DEFAULT_IMG_YN = 'Y' ) AS SYS_IMG_NM 
+		     , (SELECT MAX(SYS_IMG_NM) FROM TB_GOODS_IMG  WHERE GOODS_CD = A.GOODS_CD AND COLOR_CD = A.OPT_CD1 AND DEFAULT_IMG_YN = 'Y' ) AS SYS_IMG_NM 
 		     , C.COLOR_ENM 
 		FROM (
 		      SELECT A.GOODS_CD 

+ 3 - 18
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsDealForm.html

@@ -115,22 +115,9 @@
 		{headerName: "CRUD", field: "crud", width: 75, minWidth: 75, hide: true},
 		{headerName: "정렬", field: "dispOrd", width: 70 ,hide: false, cellClass: 'text-center',  rowDrag: true },
 		//{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
-		{headerName: "이미지", field: "imgPath1", width: 100, height: 60, cellClass: 'text-center'
+		{headerName: "이미지", field: "sysImgNm", width: 100, height: 60, cellClass: 'text-center'
 			,cellRenderer: function(params) {
-				if (params.data.imgType == "G030_A"){
-					if (gagajf.isNull(params.value)) {
-						return '<img width="60" src="'+ params.data.imgPath6 + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					} else {
-						return '<img width="60" src="'+ params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}
-					
-				}else{
-					if(!gagajf.isNull(params.data.imgPath6)){
-						return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6 + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}else{
-						return '<img width="60" src="'+ uploadGoodsUrl+params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}	
-				}
+				return '<img width="60" src="'+ _goodsUrl+ "/" + params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
 			}
 		},
 		{headerName: "구성상품코드", field: "compsGoodsCd" , width: 130, cellClass: 'text-center'},
@@ -250,9 +237,7 @@
 						, compsGoodsOptNm : goods.goodsNm
 						, currPrice : goods.currPrice
 						, selfGoodsYn : goods.selfGoodsYn
-						, imgType : goods.imgType
-						, imgPath1 : goods.imgPath1
-						, imgPath6 : goods.imgPath6
+						, sysImgNm : goods.sysImgNm
 						};
 				//그리드 마지막에 추가해야함
 				gridGoodsDealOptions.api.updateRowData({add: [data], addIndex: idx});

+ 1 - 3
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsDetailForm.html

@@ -2032,9 +2032,7 @@
 						, extendGoodsCdNm : goods.goodsNm
 						, currPrice : goods.currPrice
 						, selfGoodsYn : goods.selfGoodsYn
-						, imgType : goods.imgType
-						, imgPath1 : goods.imgPath1
-						, imgPath6 : goods.imgPath6
+						, sysImgNm : goods.sysImgNm
 						};
 				gridGoodsComposeOptions.api.updateRowData({add: [data], addIndex: idx});
 				

+ 2 - 9
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsDetailSizeStockForm.html

@@ -37,14 +37,7 @@
 			<td class="aC" th:text="${sizeStatus.count}">1</td>
 			<td class="aC"><label class="rdoBtn"><input type="radio" name="basicColor" th:value="${goodsColor.optCd1}"  th:checked="${goodsColor.mainColorYn =='Y'}" /></label></td>
 			<td class="aC">
-				<th:block th:if="${goodsColor.imgType == 'G030_A'}">
-					<img width="60" th:if="${goodsColor.imgPath6}" th:src="${goodsColor.imgPath6}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/image/no.gif'}+'\';'" alt="">
-					<img width="60" th:unless="${goodsColor.imgPath6}" th:src="${goodsColor.imgPath1}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/image/no.gif'}+'\';'" alt="">
-				</th:block>
-				<th:block th:unless="${goodsColor.imgType == 'G030_A'}">
-					<img width="60" th:if="${goodsColor.imgPath6}" th:src="${uploadGoodsUrl+goodsColor.imgPath6}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/image/no.gif'}+'\';'" alt="">
-					<img width="60" th:unless="${goodsColor.imgPath6}" th:src="${uploadGoodsUrl+goodsColor.imgPath1}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/image/no.gif'}+'\';'" alt="">
-				</th:block>
+				<img width="60" th:src="${uploadGoodsUrl+'/'+goodsColor.sysImgNm}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/image/no.gif'}+'\';'" alt="">
 				<input type="hidden" name="sysImgNmOrg" id="sysImgNmOrg" th:value="${goodsColor.sysImgNm}"/>
 			</td>	
 			<td class="aC" ><th:block th:text="${goodsColor.optCd1}">BK</th:block> 
@@ -53,7 +46,7 @@
 			<td class="aC" ><th:block th:text="${goodsColor.colorEnm}">BLACK</th:block>  
 				<input type="hidden" name="colorNm" id="colorNm" th:value="${goodsColor.colorEnm}"/>
 			</td>
-			<td><button type="button" class="btn btn-base btn-lg" onclick="fnGoodsDetailImg(this)" th:text="${#strings.isEmpty(goodsColor.imgPath1) ?'등록':'수정'}">등록</button></td>
+			<td><button type="button" class="btn btn-base btn-lg" onclick="fnGoodsDetailImg(this)" th:text="${#strings.isEmpty(goodsColor.sysImgNm) ?'등록':'수정'}">등록</button></td>
 		</tr>
 		</th:block>
 		</tbody>

+ 4 - 3
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsItemkindForm.html

@@ -120,7 +120,7 @@
 						</td>
 						<th>담당MD</th>
 						<td>
-							<select  name="mdId" id="mdId">
+							<select  name="mdNo" id="mdNo">
 								<option value="">[전체]</option>
 								<option th:if="${brandMdList}" th:each="oneData, status : ${brandMdList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
 							</select>
@@ -272,11 +272,12 @@
 
 	// 조회
 	$('#btnSearch').on('click', function() {
-		if($("#selCate2").val()=='' && $("#condition").val()=='' && $("#brandGrpNm").val()=='' && $("#itemkindCdSearch").val()==''
-			&& $("#styleYear").val()=='' && $("#formalGb").val()=='' && $("#mdId").val()==''){
+		if(gagajf.isNull($("#selCate2").val()) && gagajf.isNull($("#supplyCompCd").val()) && gagajf.isNull($("#condition").val()) && gagajf.isNull($("#itemkindCdSearch").val())
+			&& gagajf.isNull($("#styleYear").val()) && gagajf.isNull($("#formalGb").val()) && gagajf.isNull($("#mdNo").val())){
 			mcxDialog.alert('검색조건을 입력해 주세요.');
 			return;
 		}
+		
 		$("#searchForm input[name=searchGb]").val("BASIC");
 		fnSearch();
 	});

+ 2 - 15
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsPopupListForm.html

@@ -247,28 +247,15 @@
 	var goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
 	var formalGbList = gagajf.convertToArray([[${formalGbList}]]);
 	var seasonList = gagajf.convertToArray([[${seasonList}]]);
-	var uploadGoodsUrl = [[${@environment.getProperty('upload.goods.view')}]];
 	
 	var popupGoodsColumnDefs = [
 		{width: 40, minWidth: 40, cellClass: 'text-right', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
 		{headerName: 'No', width: 60, cellClass: 'text-center',
 			valueGetter: function(params) { return cfnGridNumner('goodsPopupForm',params.node.rowIndex, 'A');}
 		},
-		{headerName: "이미지", field: "imgPath1", width: 100, height: 60, cellClass: 'text-center'
+		{headerName: "이미지", field: "sysImgNm", width: 100, height: 60, cellClass: 'text-center'
 			,cellRenderer: function(params) {
-				if (params.data.imgType == "G030_A"){
-					if(!gagajf.isNull(params.data.imgPath6)){
-						return '<img width="60" src="'+ params.data.imgPath1 + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
-					}else{
-						return '<img width="60" src="'+ params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
-					}
-				}else{
-					if(!gagajf.isNull(params.data.imgPath6)){
-						return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6 + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}else{
-						return '<img width="60" src="'+ uploadGoodsUrl+params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}	
-				}
+				return '<img width="60" src="'+ _goodsUrl+ "/" + params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
 			}
 		},
 		{headerName: "브랜드", field: "brandCd", width: 100, cellClass: 'text-center'},

+ 2 - 14
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsReinboundInformForm.html

@@ -163,21 +163,9 @@
 			valueGetter: function(params) { return cfnGridNumner('searchForm',params.node.rowIndex, 'A');}
 		},
 		{headerName: "브랜드명", field: "brandEnm", width: 130, cellClass: 'text-center'},
-		{headerName: "이미지", field: "imgPath1", width: 100, height: 60, cellClass: 'text-center'
+		{headerName: "이미지", field: "sysImgNm", width: 100, height: 60, cellClass: 'text-center'
 			,cellRenderer: function(params) {
-				if (params.data.imgType == "A"){
-					if(!gagajf.isNull(params.data.imgPath6)){
-						return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6.replace("/1000/","/100/") + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}else{
-						return '<img width="60" src="'+ uploadGoodsUrl+params.value.replace("/1000/","/100/") + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}
-				}else{
-					if(!gagajf.isNull(params.data.imgPath6)){
-						return '<img width="60" src="'+ params.data.imgPath1 + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
-					}else{
-						return '<img width="60" src="'+ params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
-					}
-				}
+				return '<img width="60" src="'+ _goodsUrl+ "/" + params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
 			}
 		},
 		{headerName: "상품코드", field: "goodsCd", width: 130, cellClass: 'text-center'},

+ 3 - 18
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsSetForm.html

@@ -116,22 +116,9 @@
 		{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
 		{headerName: "정렬", field: "dispOrd", width: 70 ,hide: false, cellClass: 'text-center',  rowDrag: true },
 		//{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
-		{headerName: "이미지", field: "imgPath1", width: 100, height: 60, cellClass: 'text-center'
+		{headerName: "이미지", field: "sysImgNm", width: 100, height: 60, cellClass: 'text-center'
 			,cellRenderer: function(params) {
-				if (params.data.imgType == "G030_A"){
-					if (gagajf.isNull(params.value)) {
-						return '<img width="60" src="'+ params.data.imgPath6 + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					} else {
-						return '<img width="60" src="'+ params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}
-					
-				}else{
-					if(!gagajf.isNull(params.data.imgPath6)){
-						return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6 + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}else{
-						return '<img width="60" src="'+ uploadGoodsUrl+params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}	
-				}
+				return '<img width="60" src="'+ _goodsUrl+ "/" + params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
 			}
 		},
 		{headerName: "구성상품코드", field: "compsGoodsCd" , width: 130, cellClass: 'text-center'},
@@ -256,9 +243,7 @@
 						, goodsNm : goods.goodsNm
 						, selfGoodsYn : goods.selfGoodsYn
 						, supplyCompCd : goods.supplyCompCd
-						, imgType : goods.imgType
-						, imgPath1 : goods.imgPath1
-						, imgPath6 : goods.imgPath6
+						, sysImgNm : goods.sysImgNm
 						};
 				//그리드 마지막에 추가해야함
 				gridGoodsSetOptions.api.updateRowData({add: [data], addIndex: idx});