Prechádzať zdrojové kódy

샵링커 상품상세수정

jmh 4 rokov pred
rodič
commit
38535922fd

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

@@ -240,15 +240,19 @@ public class TsaShoplinkerService {
 				sbRequest.append("	</productInfo>\n");
 				sbRequest.append("</shoplinker>\n");
 
-				if( null != goodsMap.getShoplinkerItemkindNm()) {
+				if( null != goodsMap.getShoplinkerItemkindNm() && !"".equals(detailDesc)){
 					// api 호출 및 결과 history 저장
 					callGoodsRegApi(regMap , sbRequest, "product");
 
 				}else {
-					// 품목매핑정보 없음. 전송 안함
+					// 품목매핑정보 또는 상세내용 없음. 전송 안함
 					regMap.setXmlTxt(sbRequest.toString());
 					regMap.setApiResult(TscConstants.ShoplinkerApiStat.S_ERROR.value());
-					regMap.setApiMessage("API 전송안함 : 샵링커 품목매핑정보가 없습니다. (자사품목코드: "+goodsMap.getItemkindCd()+")");
+					if( "".equals(detailDesc)) {
+						regMap.setApiMessage("API 전송안함 : 상세설명 관련정보가 없습니다.");
+					}else {
+						regMap.setApiMessage("API 전송안함 : 샵링커 품목매핑정보가 없습니다. (자사품목코드: "+goodsMap.getItemkindCd()+")");
+					}
 					tscShoplinkerDao.insertShoplinerApiHst(regMap);
 				}
 			}else {
@@ -280,11 +284,13 @@ public class TsaShoplinkerService {
 		// 상세폼신규사용여부 N: 기존 정보 / Y : html 형식
 		if( "N".equals(goodsMap.getTobeFormYn())){
 			String descStr = goodsMap.getDetailDesc();
-			descStr = descStr.replace("http://www.istyle24.com/Upload/", "http://image.istyle24.com/Local/")
-					.replace("/Upload", "http://image.istyle24.com/Local")
-					.replace("http://www.istyle24.com/Images", "http://image.istyle24.com/Statics/design/Images");
+			if( null != descStr) {
+				descStr = descStr.replace("http://www.istyle24.com/Upload/", "http://image.istyle24.com/Local/")
+						.replace("/Upload", "http://image.istyle24.com/Local")
+						.replace("http://www.istyle24.com/Images", "http://image.istyle24.com/Statics/design/Images");
 
-			htmlDesc = descStr;
+				htmlDesc = descStr;
+			}
 
 		}else {
 
@@ -331,13 +337,15 @@ public class TsaShoplinkerService {
 			}
 
 			// 제대로된 정보 없을 경우, 기존 상세내용으로 보냄
-			if( "".equals(dImgFront) || "".equals(dImgBack)) {
+			if( "".equals(dImgFront)) {
 				String descStr = goodsMap.getDetailDesc();
-				descStr = descStr.replace("http://www.istyle24.com/Upload/", "http://image.istyle24.com/Local/")
-						.replace("/Upload", "http://image.istyle24.com/Local")
-						.replace("http://www.istyle24.com/Images", "http://image.istyle24.com/Statics/design/Images");
+				if( null != descStr) {
+					descStr = descStr.replace("http://www.istyle24.com/Upload/", "http://image.istyle24.com/Local/")
+							.replace("/Upload", "http://image.istyle24.com/Local")
+							.replace("http://www.istyle24.com/Images", "http://image.istyle24.com/Statics/design/Images");
 
-				htmlDesc = descStr;
+					htmlDesc = descStr;
+				}
 
 			}else {