|
@@ -192,18 +192,23 @@ public class FdkkSceneEditService {
|
|
|
uploadToCdfOssUtil.upload(localPath,s3PathKey);
|
|
|
}
|
|
|
|
|
|
- public void writeHotJson(String num,String pType) throws IOException {
|
|
|
- if(pType.equals("HK")){
|
|
|
- writeHotJsonHk(num,"eshop_en");
|
|
|
- writeHotJsonHk(num,"eshop_zh");
|
|
|
- writeHotJsonHk(num,"eshop_cn");
|
|
|
- return;
|
|
|
+ public void writeHotJson(String num,String pType) {
|
|
|
+ try {
|
|
|
+ if(pType.equals("HK")){
|
|
|
+ writeHotJsonHk(num,"eshop_en");
|
|
|
+ writeHotJsonHk(num,"eshop_zh");
|
|
|
+ writeHotJsonHk(num,"eshop_cn");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ JSONArray hotJson = getHotJson(num,pType,"all");
|
|
|
+ String path = String.format(hotLocalPath,num)+"/"+"hot.json";
|
|
|
+ String json = JSONUtil.toJsonStr(hotJson);
|
|
|
+ FileUtils.writeFile(path,json );
|
|
|
+ uploadToCdfOssUtil.upload(path,String.format(hotCdfPath, num));
|
|
|
+ }catch (Exception e){
|
|
|
+ log.error("writeHotJson",e);
|
|
|
}
|
|
|
- JSONArray hotJson = getHotJson(num,pType,"all");
|
|
|
- String path = String.format(hotLocalPath,num)+"/"+"hot.json";
|
|
|
- String json = JSONUtil.toJsonStr(hotJson);
|
|
|
- FileUtils.writeFile(path,json );
|
|
|
- uploadToCdfOssUtil.upload(path,String.format(hotCdfPath, num));
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public void writeHotJsonHk(String num,String lang){
|