Procházet zdrojové kódy

[ST24PRJ-684] [개선] 샵링커 상품 상세 내용 등록

jmh před 4 roky
rodič
revize
d10cd8c8be

+ 182 - 135
src/main/java/com/style24/admin/biz/service/TsaShoplinkerService.java

@@ -255,7 +255,7 @@ public class TsaShoplinkerService {
 					regMap.setXmlTxt(sbRequest.toString());
 					regMap.setApiResult(TscConstants.ShoplinkerApiStat.S_ERROR.value());
 					if( "".equals(detailDesc)) {
-						regMap.setApiMessage("API 전송안함 : 상세설명 관련정보가 없습니다.");
+						regMap.setApiMessage("API 전송안함 : 상품상세설명 관련정보가 없습니다.");
 					}else {
 						regMap.setApiMessage("API 전송안함 : 샵링커 품목매핑정보가 없습니다. (자사품목코드: "+goodsMap.getItemkindCd()+")");
 					}
@@ -284,7 +284,8 @@ public class TsaShoplinkerService {
 	 * @since 2021. 5. 20
 	 */
 	private String setDetailDesc(ShoplinkerGoods shoplinkerGoods, ShoplinkerGoods goodsMap) {
-
+		String sendYn = "Y";	// 샵링커 전송가능여부
+		String tobeYNot = "N";	// TOBE_FORM_YN = Y & 기술서 매칭이미지 없음 & 기존상세내용 있음 인경우 체크 
 		String htmlDesc = "";
 		ShoplinkerGoods imgParam = new ShoplinkerGoods();	// shoplinkerGoods에 set하지 않도록 주의(미초기화 시 그다음 상품정보에 영향을 미침)
 		imgParam.setGoodsCd(shoplinkerGoods.getGoodsCd());
@@ -349,6 +350,43 @@ public class TsaShoplinkerService {
 			// 제대로된 정보 없을 경우, 기존 상세내용으로 보냄
 			if( "".equals(dImgFront) && dImgModelList.size() < 1 && dImgDetailList.size() < 1) {
 				htmlDesc = descStr;
+				
+				// 글자수 적은건 제외 처리 (C214DNG01P 의 경우, "<p><br></p>" 값이 들어가 있어서 세팅이 안되므로 세팅해주기 위함.)  
+				if(null != descStr) {
+					if(descStr.length() < 20 ) {
+						descStr = "";
+					}else {
+						tobeYNot = "Y";
+					}
+				}
+				
+				if(!StringUtils.isNotBlank(descStr)) {
+					descStr = ""; // 초기화
+					
+					ShoplinkerGoods allImgParam = new ShoplinkerGoods();
+					allImgParam.setGoodsCd(imgParam.getGoodsCd());
+					imgParam.setExtmallImgYn("N");
+					imgParam.setExtmallDescImgYn("N");
+					imgParam.setColorListYn("N");
+					Collection<ShoplinkerGoods> allImgList = admShoplinkerDao.getGoodsImageList(imgParam);
+					
+					for(ShoplinkerGoods map : allImgList) {
+						descStr += "<img src=\""+ imgPath+"/"+map.getSysImgNm()+"\" alt=\"\" style=\"max-width:720px;width:auto;margin: 10px auto 0;display: block;\">";
+					}
+				}
+				
+				// 세팅할 이미지가 없을경우 샵링커에 전송하지 않음 처리 21.12.27 추가
+				if(!StringUtils.isNotBlank(descStr)) {
+					sendYn = "N";
+				}else {
+					if( !"Y".equals(tobeYNot)) {
+						htmlDesc = "<div class=\"st_view_outfit_box\" style=\"margin-top: 100px;text-align: center;\">";
+						htmlDesc += descStr + "</div>";
+					}else {
+						htmlDesc = "<div style=\"max-width:1200px; margin:auto;\">";
+						htmlDesc += descStr + "</div>";
+					}
+				}
 
 			}else {
 				htmlDesc = ""; // 초기화
@@ -461,81 +499,85 @@ public class TsaShoplinkerService {
 				}
 
                 htmlDesc += dtlDesc;
+			}    
+            
 
-                // 이미지 경로 수정
-                htmlDesc = htmlDesc.replace("http://www.istyle24.com/Upload/", "http://image.istyle24.com/Local/")
-    					.replace("http://www.istyle24.com/Images", "http://image.istyle24.com/Statics/design/Images");
-
-    			if( -1 < htmlDesc.indexOf("\"/Upload")) {
-    				htmlDesc = htmlDesc.replace("/Upload", "http://image.istyle24.com/Local");
-    			}
-    			// 이미지 경로 수정
-
-                // 7) 상세내용 - 사이즈
-                Collection<ShoplinkerGoods> sizeList = admShoplinkerDao.getGoodsSizeList(shoplinkerGoods);
-                if (sizeList == null || sizeList.isEmpty()) {
-                	//대표상품 실측정사이즈표 없을경우 > 브랜드 별 표준 이미지
-                	htmlDesc += "<div class=\"st_view_size_box\" style=\"margin-top: 100px;text-align: center;\">";
-                	htmlDesc += "<span class=\"st_tit_view\" style=\"display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;\">사이즈정보</span>";
-                	htmlDesc += "<div class=\"st_view\" style=\"margin-top: 40px;\">";
-
-                	String brandSizeImg = env.getProperty("domain.image").replace("/Upload", "") + "/Upload/brandSizeImg/";
-                	if( "Y".equals(goodsMap.getKidsYn())){
-                		// 나이키 조던/나이키 에스비/나이키 와이에이/컨버스/헐리 는 플레이키즈 사이즈표
-        	    		if( "S0003".equals(goodsMap.getBrandCd()) || "S0004".equals(goodsMap.getBrandCd()) || "S0007".equals(goodsMap.getBrandCd())
-        	    			|| "S0001".equals(goodsMap.getBrandCd()) || "S0006".equals(goodsMap.getBrandCd())){
-
-        	    			brandSizeImg += "kids/PLAYKIZ.jpg";
-        	    		}else {
-        	    			brandSizeImg += "kids/"+goodsMap.getBrandEnm() +".jpg";
-        	    		}
-
-        	    		htmlDesc += "<img src=\""+ brandSizeImg +"\" alt=\"표준 사이즈\" style=\"display: block;margin: 10px auto 0;\">";
-
-                	}else {
-                		brandSizeImg += "casuals/"+goodsMap.getBrandEnm() +".jpg";
-                		htmlDesc += "<img src=\""+ brandSizeImg +"\" alt=\"표준 사이즈\" style=\"display: block;margin: 10px auto 0;\">";
-                	}
-                    htmlDesc += "</div>";
-                    htmlDesc += "</div>";
-
-                }else {
-
-                	htmlDesc += "<div class=\"st_view_size_box\" style=\"margin-top: 100px;text-align: center;\">";
-                	htmlDesc += "<span class=\"st_tit_view\" style=\"display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;\">사이즈정보</span>";
-                	htmlDesc += "<div class=\"st_view\" style=\"margin-top: 40px;\">";
-
-                	htmlDesc += "<div class=\"st_tbl\" style=\"padding:0; border-top:1px solid #000;\">";
-                	htmlDesc += "<table style=\"margin:0;padding:0;border-collapse:collapse;border-spacing:0;width:100%;border-top:1px solid #000;word-break:keep-all;\">";
-                	htmlDesc += "<thead style=\"\">";
-                	htmlDesc += "<tr style=\"\">";
-
-                	int cnt = 0;
-                	for(ShoplinkerGoods size : sizeList) {
-
-                		if( 0 == cnt ) {
-                			if( "하의".equals(size.getSizeTypecd())) {
-                				htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\"></th>";
-        	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">허리둘레(cm)</th>";
-        	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">밑위(cm)</th>";
-        	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">엉덩이둘레(cm)</th>";
-        	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">허벅지둘레(cm)</th>";
-        	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">총길이(cm)</th>";
-                			}else {
-                				htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\"></th>";
-        	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">가슴둘레(cm)</th>";
-        	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">어깨너비(cm)</th>";
-        	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">팔길이(cm)</th>";
-        	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">총길이(cm)</th>";
-                			}
-                			htmlDesc += "</tr>";
-    	                	htmlDesc += "</thead>";
-    	                	htmlDesc += "<tbody style=\"\">";
-                		}
-
-                		htmlDesc += "<tr style=\"\">";
-                		htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">"+ size.getOptCd2() +"</th>";
-        				htmlDesc += "<td style=\"position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;\">"+ size.getSizeValue1() +"</td>";
+			// 이미지 경로 수정
+            htmlDesc = htmlDesc.replace("http://www.istyle24.com/Upload/", "http://image.istyle24.com/Local/")
+					.replace("http://www.istyle24.com/Images", "http://image.istyle24.com/Statics/design/Images");
+
+			if( -1 < htmlDesc.indexOf("\"/Upload")) {
+				htmlDesc = htmlDesc.replace("/Upload", "http://image.istyle24.com/Local");
+			}
+			// 이미지 경로 수정
+
+			// 기술서아닌 상세내용 세팅에 사이즈정보가 있어서 중복으로 보여주지 않도록 처리 (ex A214PT184P 등)
+			if( !"Y".equals(tobeYNot)){
+	            // 7) 상세내용 - 사이즈
+	            Collection<ShoplinkerGoods> sizeList = admShoplinkerDao.getGoodsSizeList(shoplinkerGoods);
+	            if (sizeList == null || sizeList.isEmpty()) {
+	            	//대표상품 실측정사이즈표 없을경우 > 브랜드 별 표준 이미지
+	            	htmlDesc += "<div class=\"st_view_size_box\" style=\"margin-top: 100px;text-align: center;\">";
+	            	htmlDesc += "<span class=\"st_tit_view\" style=\"display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;\">사이즈정보</span>";
+	            	htmlDesc += "<div class=\"st_view\" style=\"margin-top: 40px;\">";
+	
+	            	String brandSizeImg = env.getProperty("domain.image").replace("/Upload", "") + "/Upload/brandSizeImg/";
+	            	if( "Y".equals(goodsMap.getKidsYn())){
+	            		// 나이키 조던/나이키 에스비/나이키 와이에이/컨버스/헐리 는 플레이키즈 사이즈표
+	    	    		if( "S0003".equals(goodsMap.getBrandCd()) || "S0004".equals(goodsMap.getBrandCd()) || "S0007".equals(goodsMap.getBrandCd())
+	    	    			|| "S0001".equals(goodsMap.getBrandCd()) || "S0006".equals(goodsMap.getBrandCd())){
+	
+	    	    			brandSizeImg += "kids/PLAYKIZ.jpg";
+	    	    		}else {
+	    	    			brandSizeImg += "kids/"+goodsMap.getBrandEnm() +".jpg";
+	    	    		}
+	
+	    	    		htmlDesc += "<img src=\""+ brandSizeImg +"\" alt=\"표준 사이즈\" style=\"display: block;margin: 10px auto 0;\">";
+	
+	            	}else {
+	            		brandSizeImg += "casuals/"+goodsMap.getBrandEnm() +".jpg";
+	            		htmlDesc += "<img src=\""+ brandSizeImg +"\" alt=\"표준 사이즈\" style=\"display: block;margin: 10px auto 0;\">";
+	            	}
+	                htmlDesc += "</div>";
+	                htmlDesc += "</div>";
+	
+	            }else {
+	
+	            	htmlDesc += "<div class=\"st_view_size_box\" style=\"margin-top: 100px;text-align: center;\">";
+	            	htmlDesc += "<span class=\"st_tit_view\" style=\"display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;\">사이즈정보</span>";
+	            	htmlDesc += "<div class=\"st_view\" style=\"margin-top: 40px;\">";
+	
+	            	htmlDesc += "<div class=\"st_tbl\" style=\"padding:0; border-top:1px solid #000;\">";
+	            	htmlDesc += "<table style=\"margin:0;padding:0;border-collapse:collapse;border-spacing:0;width:100%;border-top:1px solid #000;word-break:keep-all;\">";
+	            	htmlDesc += "<thead style=\"\">";
+	            	htmlDesc += "<tr style=\"\">";
+	
+	            	int cnt = 0;
+	            	for(ShoplinkerGoods size : sizeList) {
+	
+	            		if( 0 == cnt ) {
+	            			if( "하의".equals(size.getSizeTypecd())) {
+	            				htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\"></th>";
+	    	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">허리둘레(cm)</th>";
+	    	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">밑위(cm)</th>";
+	    	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">엉덩이둘레(cm)</th>";
+	    	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">허벅지둘레(cm)</th>";
+	    	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">총길이(cm)</th>";
+	            			}else {
+	            				htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\"></th>";
+	    	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">가슴둘레(cm)</th>";
+	    	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">어깨너비(cm)</th>";
+	    	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">팔길이(cm)</th>";
+	    	                	htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">총길이(cm)</th>";
+	            			}
+	            			htmlDesc += "</tr>";
+		                	htmlDesc += "</thead>";
+		                	htmlDesc += "<tbody style=\"\">";
+	            		}
+	
+	            		htmlDesc += "<tr style=\"\">";
+	            		htmlDesc += "<th style=\"position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;\">"+ size.getOptCd2() +"</th>";
+	    				htmlDesc += "<td style=\"position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;\">"+ size.getSizeValue1() +"</td>";
 						htmlDesc += "<td style=\"position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;\">"+ size.getSizeValue2() +"</td>";
 						htmlDesc += "<td style=\"position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;\">"+ size.getSizeValue3() +"</td>";
 						htmlDesc += "<td style=\"position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;\">"+ size.getSizeValue4() +"</td>";
@@ -543,28 +585,28 @@ public class TsaShoplinkerService {
 							htmlDesc += "<td style=\"position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;\">"+ size.getSizeValue5() +"</td>";
 						}
 						htmlDesc += "</tr>";
-                		cnt ++;
-                	}
-
-                	htmlDesc += "</tbody>";
-                	htmlDesc += "</table>";
-        			htmlDesc += "</div>";
+	            		cnt ++;
+	            	}
+	
+	            	htmlDesc += "</tbody>";
+	            	htmlDesc += "</table>";
+	    			htmlDesc += "</div>";
 					htmlDesc += "</div>";
 					htmlDesc += " </div>";
-                }
-                
-                // https 추가
-                if( -1 < htmlDesc.indexOf("src=\"//image")) {
-    				htmlDesc = htmlDesc.replaceAll("src=\"//image", "src=\"https://image");
-    			}
-
-                // 8) 상세내용 - 상품필수정보
-                ShoplinkerGoods certInfo = admShoplinkerDao.getCert(shoplinkerGoods);
-                if( null != certInfo) {
-                	if( "G083_1".equals(certInfo.getCertTargetGb())) {	// 인증대상
-
-                		if( null == certInfo.getCertNum() || "".equals(certInfo.getCertNum())) {
-                			if( null != certInfo.getCertDiv()) {
+	            }
+	            
+	            // https 추가
+	            if( -1 < htmlDesc.indexOf("src=\"//image")) {
+					htmlDesc = htmlDesc.replaceAll("src=\"//image", "src=\"https://image");
+				}
+	
+	            // 8) 상세내용 - 상품필수정보
+	            ShoplinkerGoods certInfo = admShoplinkerDao.getCert(shoplinkerGoods);
+	            if( null != certInfo) {
+	            	if( "G083_1".equals(certInfo.getCertTargetGb())) {	// 인증대상
+	
+	            		if( null == certInfo.getCertNum() || "".equals(certInfo.getCertNum())) {
+	            			if( null != certInfo.getCertDiv()) {
 	                			htmlDesc += "<div class=\"st_required_box\" style=\"margin-bottom:80px;\">";
 	                			htmlDesc += "<div class=\"st_area_kcl\" style=\"color:#222;display:block; position:relative; min-height:160px; margin-top:100px; padding:40px 40px 40px 160px; box-sizing:border-box; background:#f5f5f5;\">";
 	                			htmlDesc += "<i class=\"st_ico_kcl\" style=\"position:absolute;left:64px;top:50%;transform:translateY(-50%);z-index:2;background-image: url('https://image.istyle24.com/Style24/images/pc/ico_kcl.png');width: 32px;height: 50px;display: inline-block;vertical-align: middle;background-repeat: no-repeat;background-size: contain;background-position: 0% 0%;\"></i>";
@@ -580,47 +622,52 @@ public class TsaShoplinkerService {
 	                            htmlDesc += "</p>";
 	                            htmlDesc += "</div>";
 	                            htmlDesc += "</div>";
-                			}
-                		}else {
-                			htmlDesc += "<div class=\"st_required_box\" style=\"margin-bottom:80px;\">";
-                			htmlDesc += "<div class=\"st_area_kcl\" style=\"display:block; position:relative; min-height:160px; margin-top:100px; padding:40px 40px 40px 160px; box-sizing:border-box; background:#f5f5f5;\">";
-                			htmlDesc += "<i class=\"st_ico_kcl\" style=\"position:absolute;left:64px;top:50%;transform:translateY(-50%);z-index:2;background-image: url('https://image.istyle24.com/Style24/images/pc/ico_kcl.png');width: 32px;height: 50px;display: inline-block;vertical-align: middle;background-repeat: no-repeat;background-size: contain;background-position: 0% 0%;\"></i>";
-                			htmlDesc += "<p class=\"st_tit\" style=\"margin-top:0;color:#222;font-size:16px;font-weight:300;line-height:1;letter-spacing:-0.025em;\">";
-                			htmlDesc += certInfo.getCertDiv() +"/"+ certInfo.getCertOrganName();
-                            htmlDesc += "</p>";
-                            htmlDesc += "<p style=\"margin-top:20px; color:#222; font-size:13px; font-weight: 300; line-height:1; letter-spacing:-0.025em;\">";
-                            htmlDesc += "인증번호: "+ certInfo.getCertNum();
-                            htmlDesc += "<a href=\"http://www.safetykorea.kr/search/searchPop?certNum="+certInfo.getCertNum()+ "\" target=\"_blank\" class=\"st_linktxt3\" style=\"margin-left:20px; color:#888; font-weight:200; text-decoration:none !important;\">상세보기</a>";
-                            htmlDesc += "</p>";
-                            htmlDesc += "<p class=\"st_dot_info\" style=\"color: #888888;position:relative;margin-top:20px;font-size:13px;font-weight:300;line-height:1;letter-spacing:-0.025em;\">";
-                            htmlDesc += "<span style=\"color: #888888 !important;background: #888888 !important;display: inline-block;width: 2px;height: 2px;position: relative;top: -4px;left: 0px;margin-right: 4px;\"></span>";
-                            htmlDesc += "해당 인증정보는 판매자가 등록한 것으로 등록정보에 대한 일체의 책임은 판매자에게 있습니다.";
-                            htmlDesc += "</p>";
-                            htmlDesc += "</div>";
-                            htmlDesc += "</div>";
-                		}
-
-                	}else if( "G083_3".equals(certInfo.getCertTargetGb())) {	// 상세설명별도표기
-                		htmlDesc += "<div class=\"st_required_box\" style=\"margin-bottom:80px;\">";
-                		htmlDesc += "<div class=\"st_area_kcl st_no-mark\" style=\"display:block;position:relative;min-height:160px;margin-top:100px;padding:40px 40px 40px 160px;box-sizing:border-box;background:#f5f5f5;padding-left:65px;\">";
-                		htmlDesc += "<p class=\"st_tit\" style=\"margin-top:0;color:#222;font-size:16px;font-weight:300;line-height:1;letter-spacing:-0.025em;\">";
-                		htmlDesc += certInfo.getCertTargetNm();
-                        htmlDesc += "</p>";
-                        htmlDesc += "<p style=\"margin-top:20px; color:#222; font-size:13px; font-weight: 300; line-height:1; letter-spacing:-0.025em;\">";
-                        htmlDesc += "제품 상세정보 내 표기되어 있습니다. 상품 정보를 확인해주세요.";
-                        htmlDesc += "</p>";
-                        htmlDesc += "<p class=\"st_dot_info\" style=\"color: #888888;position:relative;margin-top:20px;font-size:13px;font-weight:300;line-height:1;letter-spacing:-0.025em;\">";
-                        htmlDesc += "<span style=\"color: #888888 !important;background: #888888 !important;display: inline-block;width: 2px;height: 2px;position: relative;top: -4px;left: 0px;margin-right: 4px;\"></span>";
-                        htmlDesc += "해당 인증정보는 판매자가 등록한 것으로 등록정보에 대한 일체의 책임은 판매자에게 있습니다.";
-                        htmlDesc += "</p>";
-                        htmlDesc += "</div>";
-                        htmlDesc += "</div>";
-                	}else {
-                		// G083_2 - 인증대상아님
-                	}
-                }
+	            			}
+	            		}else {
+	            			htmlDesc += "<div class=\"st_required_box\" style=\"margin-bottom:80px;\">";
+	            			htmlDesc += "<div class=\"st_area_kcl\" style=\"display:block; position:relative; min-height:160px; margin-top:100px; padding:40px 40px 40px 160px; box-sizing:border-box; background:#f5f5f5;\">";
+	            			htmlDesc += "<i class=\"st_ico_kcl\" style=\"position:absolute;left:64px;top:50%;transform:translateY(-50%);z-index:2;background-image: url('https://image.istyle24.com/Style24/images/pc/ico_kcl.png');width: 32px;height: 50px;display: inline-block;vertical-align: middle;background-repeat: no-repeat;background-size: contain;background-position: 0% 0%;\"></i>";
+	            			htmlDesc += "<p class=\"st_tit\" style=\"margin-top:0;color:#222;font-size:16px;font-weight:300;line-height:1;letter-spacing:-0.025em;\">";
+	            			htmlDesc += certInfo.getCertDiv() +"/"+ certInfo.getCertOrganName();
+	                        htmlDesc += "</p>";
+	                        htmlDesc += "<p style=\"margin-top:20px; color:#222; font-size:13px; font-weight: 300; line-height:1; letter-spacing:-0.025em;\">";
+	                        htmlDesc += "인증번호: "+ certInfo.getCertNum();
+	                        htmlDesc += "<a href=\"http://www.safetykorea.kr/search/searchPop?certNum="+certInfo.getCertNum()+ "\" target=\"_blank\" class=\"st_linktxt3\" style=\"margin-left:20px; color:#888; font-weight:200; text-decoration:none !important;\">상세보기</a>";
+	                        htmlDesc += "</p>";
+	                        htmlDesc += "<p class=\"st_dot_info\" style=\"color: #888888;position:relative;margin-top:20px;font-size:13px;font-weight:300;line-height:1;letter-spacing:-0.025em;\">";
+	                        htmlDesc += "<span style=\"color: #888888 !important;background: #888888 !important;display: inline-block;width: 2px;height: 2px;position: relative;top: -4px;left: 0px;margin-right: 4px;\"></span>";
+	                        htmlDesc += "해당 인증정보는 판매자가 등록한 것으로 등록정보에 대한 일체의 책임은 판매자에게 있습니다.";
+	                        htmlDesc += "</p>";
+	                        htmlDesc += "</div>";
+	                        htmlDesc += "</div>";
+	            		}
+	
+	            	}else if( "G083_3".equals(certInfo.getCertTargetGb())) {	// 상세설명별도표기
+	            		htmlDesc += "<div class=\"st_required_box\" style=\"margin-bottom:80px;\">";
+	            		htmlDesc += "<div class=\"st_area_kcl st_no-mark\" style=\"display:block;position:relative;min-height:160px;margin-top:100px;padding:40px 40px 40px 160px;box-sizing:border-box;background:#f5f5f5;padding-left:65px;\">";
+	            		htmlDesc += "<p class=\"st_tit\" style=\"margin-top:0;color:#222;font-size:16px;font-weight:300;line-height:1;letter-spacing:-0.025em;\">";
+	            		htmlDesc += certInfo.getCertTargetNm();
+	                    htmlDesc += "</p>";
+	                    htmlDesc += "<p style=\"margin-top:20px; color:#222; font-size:13px; font-weight: 300; line-height:1; letter-spacing:-0.025em;\">";
+	                    htmlDesc += "제품 상세정보 내 표기되어 있습니다. 상품 정보를 확인해주세요.";
+	                    htmlDesc += "</p>";
+	                    htmlDesc += "<p class=\"st_dot_info\" style=\"color: #888888;position:relative;margin-top:20px;font-size:13px;font-weight:300;line-height:1;letter-spacing:-0.025em;\">";
+	                    htmlDesc += "<span style=\"color: #888888 !important;background: #888888 !important;display: inline-block;width: 2px;height: 2px;position: relative;top: -4px;left: 0px;margin-right: 4px;\"></span>";
+	                    htmlDesc += "해당 인증정보는 판매자가 등록한 것으로 등록정보에 대한 일체의 책임은 판매자에게 있습니다.";
+	                    htmlDesc += "</p>";
+	                    htmlDesc += "</div>";
+	                    htmlDesc += "</div>";
+	            	}else {
+	            		// G083_2 - 인증대상아님
+	            	}
+	            }
 			}
 		}
+		
+		if("N".equals(sendYn)) {
+			htmlDesc = "";
+		}
+		
 		return htmlDesc;
 	}
 

+ 8 - 5
src/main/java/com/style24/persistence/mybatis/shop/TsaShoplinker.xml

@@ -82,7 +82,7 @@
 				WHEN SUBSTRING(A.ITEMKIND_CD, 1, 2) = '08' || SUBSTRING(A.ITEMKIND_CD, 1, 2) = '09'
 					|| SUBSTRING(A.ITEMKIND_CD, 1, 2) = '10' || SUBSTRING(A.ITEMKIND_CD, 1, 2) = '11'
 					|| SUBSTRING(A.ITEMKIND_CD, 1, 2) = '12' || SUBSTRING(A.ITEMKIND_CD, 1, 2) = '13'
-					|| SUBSTRING(A.ITEMKIND_CD, 1, 4) = '1403'
+					|| SUBSTRING(A.ITEMKIND_CD, 1, 2) = '07' || SUBSTRING(A.ITEMKIND_CD, 1, 4) = '1403'
 			  	THEN 'Y'
 			  	ELSE 'N'
 			  END KIDS_YN
@@ -99,15 +99,17 @@
 	<select id="getGoodsImageList" parameterType="ShoplinkerGoods" resultType="ShoplinkerGoods">
 		/* TsaShoplinker.getGoodsImageList */
 		SELECT
-			B.GOODS_CD
+			DISTINCT B.GOODS_CD
 		     , B.COLOR_CD
 		     , C.COLOR_KNM
 		     , B.DISP_ORD
 		     , B.SYS_IMG_NM
 		     , B.DEFAULT_IMG_YN
 		     , B.EXTMALL_IMG_YN
-		FROM   TB_GOODS A INNER JOIN TB_GOODS_IMG B ON A.GOODS_CD = B.GOODS_CD
-				LEFT OUTER JOIN TB_COLOR C ON B.COLOR_CD = C.COLOR_CD
+		FROM   TB_GOODS A 
+		INNER JOIN TB_GOODS_IMG B ON A.GOODS_CD = B.GOODS_CD
+		INNER JOIN TB_OPTION OP ON A.GOODS_CD = OP.GOODS_CD AND B.COLOR_CD = OP.OPT_CD1 
+		LEFT OUTER JOIN TB_COLOR C ON B.COLOR_CD = C.COLOR_CD
 		WHERE A.GOODS_CD = #{goodsCd}
 		AND A.SELF_GOODS_YN = 'Y'
 		<if test='extmallImgYn != null and extmallImgYn == "Y"'>
@@ -116,11 +118,12 @@
         </if>
         <if test='extmallDescImgYn != null and extmallDescImgYn == "Y"'>
         	AND A.MAIN_COLOR_CD = B.COLOR_CD
+        	AND B.SYS_IMG_NM LIKE CONCAT('%',B.COLOR_CD,'%')
         </if>
         <if test='colorListYn != null and colorListYn == "Y"'>
 			AND (B.SYS_IMG_NM LIKE CONCAT('%',B.COLOR_CD,'_01%') OR B.SYS_IMG_NM LIKE CONCAT('%',B.COLOR_CD,'_02%' ))
         </if>
-		ORDER BY B.COLOR_CD, B.DISP_ORD
+		ORDER BY B.COLOR_CD, B.DISP_ORD, B.SYS_IMG_NM
 	</select>
 
 	<!-- 상품등록-상품 사이즈 조회 -->