|
|
@@ -151,14 +151,19 @@ public class TsaShoplinkerService {
|
|
|
sbRequest.append(" <partner_product_id><![CDATA[").append(map.getPartnerProductId()).append("]]></partner_product_id>\n");
|
|
|
sbRequest.append(" <attribute_code><![CDATA[").append("999999999").append("]]></attribute_code>\n");
|
|
|
sbRequest.append(" <product_name><![CDATA[").append(map.getOptCd1()+"_"+map.getOptCd2()).append("]]></product_name>\n");
|
|
|
- sbRequest.append(" <quantity>").append(map.getQuantity()).append("</quantity>\n");
|
|
|
+ // 재고가 0일경우 1로전송
|
|
|
+ if( 0 < map.getQuantity()) {
|
|
|
+ sbRequest.append(" <quantity>").append(map.getQuantity()).append("</quantity>\n");
|
|
|
+ }else {
|
|
|
+ sbRequest.append(" <quantity>").append("1").append("</quantity>\n");
|
|
|
+ }
|
|
|
|
|
|
sbRequest.append(" </product>\n");
|
|
|
sbRequest.append(" </productInfo>\n");
|
|
|
sbRequest.append("</shoplinker>\n");
|
|
|
|
|
|
regMap.setOptCd(map.getPartnerProductId());
|
|
|
- regMap.setQuantity(map.getQuantity());
|
|
|
+ regMap.setQuantity(map.getQuantity()); // 재고 기록은 실재고 기록 0일경우 샵링커에 전송하지 않기위함.(md가 샵링커에서 몰로 수동전송시 재고가 0일경우 몰에 등록안된다 함)
|
|
|
|
|
|
// api 호출 및 결과 history 저장
|
|
|
succCnt += callGoodsRegApi(regMap , sbRequest, "option_"+opCnt);
|
|
|
@@ -824,10 +829,7 @@ public class TsaShoplinkerService {
|
|
|
shoplinkerResult = (com.gagaframework.shoplinker.domain.goods.result.Shoplinker)shoplinkerUtil.unmarshal(com.gagaframework.shoplinker.domain.goods.result.Shoplinker.class, responseXmlData);
|
|
|
resultMsg = shoplinkerResult.getResultMessage();
|
|
|
|
|
|
- String slFolder = GagaFileUtil.getConcatenationPath(env.getProperty("shoplinker.xml.path"));
|
|
|
- File slPath = new File(slFolder);
|
|
|
-
|
|
|
- map.setXmlTxt(slPath.exists()+"\n"+xmlPath+"\n"+xmlUrl+"\n\n"+sbRequest.toString());
|
|
|
+ map.setXmlTxt(sbRequest.toString());
|
|
|
map.setApiProductId(resultMsg.getProductId());
|
|
|
map.setApiResult(resultMsg.getResult());
|
|
|
map.setApiMessage(resultMsg.getMessage());
|