|
|
@@ -64,7 +64,7 @@ public class TsaShoplinkerService {
|
|
|
*/
|
|
|
public GagaMap createShoplinkerXml(Collection<GagaMap> ecxelGoodsList, ShoplinkerGoods shoplinkerGoods)throws IOException {
|
|
|
// 파일명 추가 네이밍 규칙
|
|
|
- fileAddNm = shoplinkerGoods.getRegNo() +"_"+ GagaDateUtil.getTodayDateTime();
|
|
|
+ fileAddNm = shoplinkerGoods.getRegNo() +"_"+ GagaDateUtil.getToday("yyMMddHHmmss");
|
|
|
|
|
|
GagaMap rtnMap = new GagaMap();
|
|
|
int optionAll=0, optionSucc=0;
|
|
|
@@ -271,7 +271,7 @@ public class TsaShoplinkerService {
|
|
|
// 품목매핑정보 없음. 전송 안함
|
|
|
regMap.setXmlTxt(sbRequest.toString());
|
|
|
regMap.setApiResult("error");
|
|
|
- regMap.setApiMessage("API 전송안함=>샵링커 품목매핑정보가 없습니다. (자사품목코드: "+goodsMap.getItemkindCd()+")");
|
|
|
+ regMap.setApiMessage("API 전송안함 : 샵링커 품목매핑정보가 없습니다. (자사품목코드: "+goodsMap.getItemkindCd()+")");
|
|
|
tscShoplinkerDao.insertShoplinerApiHst(regMap);
|
|
|
}
|
|
|
|
|
|
@@ -804,6 +804,7 @@ public class TsaShoplinkerService {
|
|
|
private int callGoodsRegApi(ShoplinkerGoods map, StringBuilder sbRequest, String fileNm) throws IOException {
|
|
|
|
|
|
int succCnt = 0;
|
|
|
+ map.setApiProductId(null);
|
|
|
com.gagaframework.shoplinker.domain.goods.result.Shoplinker shoplinkerResult;
|
|
|
com.gagaframework.shoplinker.domain.goods.result.ResultMessage resultMsg;
|
|
|
|
|
|
@@ -814,7 +815,7 @@ public class TsaShoplinkerService {
|
|
|
|
|
|
// XML 파일 생성
|
|
|
xmlFileName = new StringBuilder();
|
|
|
- xmlFileName.append(fileNm+"_"+fileAddNm).append(".xml");
|
|
|
+ xmlFileName.append(fileNm+"_"+map.getGoodsCd()+"_"+fileAddNm).append(".xml");
|
|
|
String xmlPath = GagaFileUtil.getConcatenationPath(map.getXmlPath(), xmlFileName.toString());
|
|
|
shoplinkerUtil.makeRequestXmlFile(sbRequest.toString(), xmlPath);
|
|
|
String xmlUrl = GagaFileUtil.getConcatenationPath(map.getDomainUrl(), xmlFileName.toString());
|
|
|
@@ -850,12 +851,12 @@ public class TsaShoplinkerService {
|
|
|
map.setApiMessage("API 통신오류");
|
|
|
}
|
|
|
|
|
|
- // 생성 파일삭제
|
|
|
- GagaFileUtil.deleteFile(GagaFileUtil.getConcatenationPath(map.getXmlPath(), xmlFileName.toString()));
|
|
|
-
|
|
|
// 전송이력 저장
|
|
|
tscShoplinkerDao.insertShoplinerApiHst(map);
|
|
|
|
|
|
+ // 생성 파일삭제
|
|
|
+ GagaFileUtil.deleteFile(GagaFileUtil.getConcatenationPath(map.getXmlPath(), xmlFileName.toString()));
|
|
|
+
|
|
|
return succCnt;
|
|
|
}
|
|
|
|