|
|
@@ -50,20 +50,33 @@ public class TsbNaverAllEp extends TsbAbstractJob<Collection<GoodsEp>, Collectio
|
|
|
|
|
|
@Override
|
|
|
public String write(Collection<GoodsEp> goodsEpList) throws Exception {
|
|
|
+// if (goodsEpList != null && !goodsEpList.isEmpty()) {
|
|
|
+// StringBuilder sb = new StringBuilder();
|
|
|
+// this.setEpTitle(sb);
|
|
|
+//
|
|
|
+// for (GoodsEp goodsEp : goodsEpList) {
|
|
|
+// this.setEpInfo(sb, goodsEp);
|
|
|
+// }
|
|
|
+//
|
|
|
+// String uploadPath = GagaFileUtil.getConcatenationPath(env.getProperty("ep.file.path"), "iStyle24ProductFeed_NaverEp_new.txt");
|
|
|
+// log.info("네이버 전체EP 파일 경로: {}", uploadPath);
|
|
|
+//
|
|
|
+// BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(uploadPath)), "UTF-8"));
|
|
|
+// bw.write(sb.toString());
|
|
|
+// bw.flush();
|
|
|
+// bw.close();
|
|
|
+// }
|
|
|
if (goodsEpList != null && !goodsEpList.isEmpty()) {
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
this.setEpTitle(sb);
|
|
|
+ String uploadPath = GagaFileUtil.getConcatenationPath(env.getProperty("ep.file.path"), "iStyle24ProductFeed_NaverEp_new.txt");
|
|
|
+ log.info("네이버 전체EP 파일 경로: {}", uploadPath);
|
|
|
+ BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(uploadPath)), "UTF-8"));
|
|
|
|
|
|
for (GoodsEp goodsEp : goodsEpList) {
|
|
|
this.setEpInfo(sb, goodsEp);
|
|
|
+ bw.append(sb.toString());
|
|
|
}
|
|
|
-
|
|
|
- String uploadPath = GagaFileUtil.getConcatenationPath(env.getProperty("ep.file.path"), "iStyle24ProductFeed_NaverEp_new.txt");
|
|
|
- log.info("네이버 전체EP 파일 경로: {}", uploadPath);
|
|
|
-
|
|
|
- BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(uploadPath)), "UTF-8"));
|
|
|
- bw.write(sb.toString());
|
|
|
- bw.flush();
|
|
|
bw.close();
|
|
|
}
|
|
|
|