소스 검색

模具文档

5 년 전
부모
커밋
ec506b2571

+ 16 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldFileController.java

@@ -10,6 +10,7 @@ import com.hssx.cloudmodel.service.MouldFileService;
 import com.hssx.cloudmodel.service.MouldService;
 import com.hssx.cloudmodel.service.UserService;
 import com.hssx.cloudmodel.util.HttpRespMsg;
+import com.hssx.cloudmodel.util.PageUtil;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -127,5 +128,20 @@ public class MouldFileController {
         HttpRespMsg msg = mouldFileService.delFile(mouldFile);
         return msg;
     }
+
+    /**
+     * 文档批量下载列表
+     * 参数: token 用户身份凭证,id 项目id
+     *
+     * @return
+     */
+    @ApiOperation("文档批量下载列表")
+    @RequestMapping("/fileList")
+    @ResponseBody
+    public HttpRespMsg fileList(UserVO userVO, PageUtil page){
+        HttpRespMsg msg = new HttpRespMsg();
+        msg = mouldFileService.getListByUserAndProjectId(userVO, page);
+        return msg;
+    }
 }
 

+ 2 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldFileService.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.hssx.cloudmodel.entity.ProjectFile;
 import com.hssx.cloudmodel.entity.vo.UserVO;
 import com.hssx.cloudmodel.util.HttpRespMsg;
+import com.hssx.cloudmodel.util.PageUtil;
 import org.springframework.web.multipart.MultipartFile;
 
 /**
@@ -22,4 +23,5 @@ public interface MouldFileService extends IService<MouldFile> {
     HttpRespMsg getAllFileList(int mouldId, UserVO userVO);
     HttpRespMsg getFileList(int mouldId, Integer blongType, UserVO userVO);
     HttpRespMsg delFile(MouldFile mouldFile);
+    HttpRespMsg getListByUserAndProjectId(UserVO userVO, PageUtil page);
 }

+ 9 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldFileServiceImpl.java

@@ -9,6 +9,7 @@ import com.hssx.cloudmodel.service.MouldFileService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.hssx.cloudmodel.util.FileUtil;
 import com.hssx.cloudmodel.util.HttpRespMsg;
+import com.hssx.cloudmodel.util.PageUtil;
 import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.multipart.MultipartFile;
@@ -230,4 +231,12 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
         msg.data = mouldFileMapper.deleteById(mouldFile.getId());
         return msg;
     }
+
+    @Override
+    public HttpRespMsg getListByUserAndProjectId(UserVO userVO, PageUtil page) {
+        HttpRespMsg msg = new HttpRespMsg();
+        User user = userMapper.selectOne(new QueryWrapper<User>().eq("head_imgurl", userVO.getToken()));
+
+        return null;
+    }
 }