|
@@ -1,10 +1,12 @@
|
|
|
package com.fdkankan.manage_jp.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.manage_jp.common.Result;
|
|
|
import com.fdkankan.manage_jp.config.FyunConfig;
|
|
|
import com.fdkankan.manage_jp.config.ManageConfig;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.tomcat.Jar;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -23,7 +25,12 @@ public class NoticeController {
|
|
|
|
|
|
@GetMapping("/manageVersion")
|
|
|
public Result notice(){
|
|
|
- String ossPath = "manage/version/"+manageConfig.getActive() +"/manage-version.json";
|
|
|
- return Result.success(fYunFileServiceInterface.getFileContent(ossPath));
|
|
|
+ String ossPath = "manage/version/"+manageConfig.getActive() +"/manage-version.json";
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ if(fYunFileServiceInterface.equals(ossPath)){
|
|
|
+ String fileContent = fYunFileServiceInterface.getFileContent(ossPath);
|
|
|
+ jsonObject = JSONObject.parseObject(fileContent);
|
|
|
+ }
|
|
|
+ return Result.success(jsonObject);
|
|
|
}
|
|
|
}
|