|
@@ -53,7 +53,17 @@ public class FdkkSceneEditService {
|
|
|
private IHotRelationService hotRelationService;
|
|
|
@Autowired
|
|
|
FdkkSceneService fdkkSceneService;
|
|
|
+ @Autowired
|
|
|
+ CdfRolePermService cdfRolePermService;
|
|
|
+
|
|
|
|
|
|
+ public JSONObject getAuth(String num, String token) {
|
|
|
+ cdfRolePermService.checkRole(token);
|
|
|
+ String fdkkToken = fdkkSceneService.getFdkkToken(token);
|
|
|
+ HashMap<String,String> map = new HashMap<>();
|
|
|
+ map.put("num",num);
|
|
|
+ return fdkkClient.getAuth(map, fdkkToken);
|
|
|
+ }
|
|
|
|
|
|
public FdkkResponse saveTag(FdkkHotRequest fdkkHotRequest, String token) {
|
|
|
FdkkResponse fdkkResponse = fdkkClient.hotSave(fdkkHotRequest,fdkkSceneService.getFdkkToken(token));
|
|
@@ -128,7 +138,7 @@ public class FdkkSceneEditService {
|
|
|
throw new BusinessException(fdkkResponse.getCode(),fdkkResponse.getMsg());
|
|
|
}
|
|
|
JSONArray hotJson = getHotJson(fdkkHotRequest.getNum());
|
|
|
- String path = String.format(hotLocalPath, fdkkHotRequest.getNum());
|
|
|
+ String path = String.format(hotLocalPath, fdkkHotRequest.getNum())+"/"+"hot.json";
|
|
|
FileUtils.writeFile(path, hotJson.toJSONString());
|
|
|
uploadToOssUtil.upload(path,String.format(hotCdfPath, fdkkHotRequest.getNum()));
|
|
|
}
|
|
@@ -139,7 +149,8 @@ public class FdkkSceneEditService {
|
|
|
String fileName = files.getOriginalFilename();
|
|
|
assert fileName != null;
|
|
|
String prefix = fileName.substring(fileName.lastIndexOf("."));
|
|
|
- File newFile = File.createTempFile(UUID.randomUUID().toString() ,prefix);
|
|
|
+ String newFilePath = String.format(hotLocalPath,fdkkUploadRequest.getNum()) + "/"+fileName+prefix;
|
|
|
+ File newFile = new File(newFilePath);
|
|
|
files.transferTo(newFile);
|
|
|
path = newFile.getPath();
|
|
|
}
|