|
@@ -1,6 +1,7 @@
|
|
|
package com.hssx.cloudmodel.controller;
|
|
|
|
|
|
|
|
|
+import com.hssx.cloudmodel.entity.ProjectFile;
|
|
|
import com.hssx.cloudmodel.entity.vo.UserVO;
|
|
|
import com.hssx.cloudmodel.service.ProjectFileService;
|
|
|
import com.hssx.cloudmodel.util.HttpRespMsg;
|
|
@@ -39,19 +40,46 @@ public class ProjectFileController {
|
|
|
|
|
|
/**
|
|
|
* 项目文档的上传
|
|
|
- * 参数: token 用户身份凭证,项目id
|
|
|
+ * 参数: token 用户身份凭证,projectId 项目id ,file 文件信息
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@ApiOperation("项目文档的上传")
|
|
|
@RequestMapping("/uploadFile")
|
|
|
@ResponseBody
|
|
|
- public Object uploadFile(@RequestParam(required = false) MultipartFile file,
|
|
|
+ public HttpRespMsg uploadFile(@RequestParam(required = false) MultipartFile file,
|
|
|
HttpServletResponse response, HttpServletRequest request, UserVO userVO) throws Exception {
|
|
|
System.out.println("开始上传文件" + "file+" + file.getOriginalFilename());
|
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
|
msg = projectFileService.addFile(userVO,file,path);
|
|
|
return msg;
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 项目文档的上传
|
|
|
+ * 参数: token 用户身份凭证,id
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation("项目文档的下载")
|
|
|
+ @RequestMapping("/dowloadFile")
|
|
|
+ @ResponseBody
|
|
|
+ public HttpRespMsg dowloadFile(ProjectFile projectFile,String token){
|
|
|
+ HttpRespMsg msg = projectFileService.dowloadFile(projectFile,token);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 项目文档的列表
|
|
|
+ * 参数: token 用户身份凭证,projectId 项目id
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation("项目文档的列表")
|
|
|
+ @RequestMapping("/list")
|
|
|
+ @ResponseBody
|
|
|
+ public HttpRespMsg list(UserVO userVO){
|
|
|
+ HttpRespMsg msg = projectFileService.getFileList(userVO);
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
}
|
|
|
|