|
|
@@ -36,6 +36,7 @@ public class TsbDaumAllEp extends TsbAbstractJob<Collection<GoodsEp>, Collection
|
|
|
|
|
|
@Override
|
|
|
public Collection<GoodsEp> read() throws Exception {
|
|
|
+
|
|
|
// 다음 전체EP 생성
|
|
|
goodsEpService.createDaumEp("ALL");
|
|
|
|
|
|
@@ -50,6 +51,7 @@ public class TsbDaumAllEp extends TsbAbstractJob<Collection<GoodsEp>, Collection
|
|
|
|
|
|
@Override
|
|
|
public String write(Collection<GoodsEp> goodsEpList) throws Exception {
|
|
|
+ /*
|
|
|
if (goodsEpList != null && !goodsEpList.isEmpty()) {
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
sb.append("<<<tocnt>>>").append(goodsEpList.size());
|
|
|
@@ -66,6 +68,26 @@ public class TsbDaumAllEp extends TsbAbstractJob<Collection<GoodsEp>, Collection
|
|
|
bw.flush();
|
|
|
bw.close();
|
|
|
}
|
|
|
+ */
|
|
|
+
|
|
|
+ if (goodsEpList != null && !goodsEpList.isEmpty()) {
|
|
|
+ String uploadPath = GagaFileUtil.getConcatenationPath(env.getProperty("ep.file.path"), "iStyle24ProductFeed_DaumProductFull_new.txt");
|
|
|
+ log.info("다음 전체EP 파일 경로: {}", uploadPath);
|
|
|
+ BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(uploadPath)), "UTF-8"));
|
|
|
+
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ sb.append("<<<tocnt>>>").append(goodsEpList.size());
|
|
|
+ bw.append(sb.toString());
|
|
|
+
|
|
|
+ for (GoodsEp goodsEp : goodsEpList) {
|
|
|
+ sb = new StringBuilder();
|
|
|
+ this.setEpInfo(sb, goodsEp);
|
|
|
+ bw.append(sb.toString());
|
|
|
+ }
|
|
|
+ bw.write(sb.toString());
|
|
|
+ bw.flush();
|
|
|
+ bw.close();
|
|
|
+ }
|
|
|
|
|
|
return "OK";
|
|
|
}
|