|
@@ -103,11 +103,11 @@ public class WpsFileServiceImpl extends ServiceImpl<WpsFileMapper, WpsFile> impl
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Map<String,Object> getFileInfo(String userId, String filePath,String _w_filetype){
|
|
|
|
- if ("web".equalsIgnoreCase(_w_filetype)){
|
|
|
|
|
|
+ public Map<String,Object> getFileInfo(String userId, String filePath,String fileType,String fileId){
|
|
|
|
+ if ("web".equalsIgnoreCase(fileType)){
|
|
return getWebFileInfo(filePath);
|
|
return getWebFileInfo(filePath);
|
|
- }else if ("db".equalsIgnoreCase(_w_filetype)){
|
|
|
|
- return getDbFileInfo(userId);
|
|
|
|
|
|
+ }else if ("db".equalsIgnoreCase(fileType)){
|
|
|
|
+ return getDbFileInfo(userId,fileId);
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
@@ -132,11 +132,9 @@ public class WpsFileServiceImpl extends ServiceImpl<WpsFileMapper, WpsFile> impl
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
- private Map<String,Object> getDbFileInfo(String userId){
|
|
|
|
- String fileId = Context.getFileId();
|
|
|
|
- // 获取文件信息
|
|
|
|
|
|
+ private Map<String,Object> getDbFileInfo(String userId,String fileId){
|
|
|
|
+ Map<String,Object>result = new HashMap<>();
|
|
WpsFile fileEntity = this.getById(fileId);
|
|
WpsFile fileEntity = this.getById(fileId);
|
|
-
|
|
|
|
// 初始化文件读写权限为read
|
|
// 初始化文件读写权限为read
|
|
String permission = "read";
|
|
String permission = "read";
|
|
|
|
|
|
@@ -168,13 +166,10 @@ public class WpsFileServiceImpl extends ServiceImpl<WpsFileMapper, WpsFile> impl
|
|
BeanUtils.copyProperties(fileEntity,file);
|
|
BeanUtils.copyProperties(fileEntity,file);
|
|
file.setUser_acl(userAcl);
|
|
file.setUser_acl(userAcl);
|
|
file.setWatermark(watermark);
|
|
file.setWatermark(watermark);
|
|
-
|
|
|
|
- return new HashMap<String, Object>(){
|
|
|
|
- {
|
|
|
|
- put("file", file);
|
|
|
|
- put("user", user);
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
|
|
+ result.put("file",file);
|
|
|
|
+ result.put("user",user);
|
|
|
|
+ System.out.println(result.toString());
|
|
|
|
+ return result;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|