|
@@ -0,0 +1,82 @@
|
|
|
+package com.migao.controller;
|
|
|
+
|
|
|
+import com.migao.config.response.BasePageRequest;
|
|
|
+import com.migao.config.response.PageBeanOne;
|
|
|
+import com.migao.config.response.ResponseBean;
|
|
|
+import com.migao.entity.vo.req.DocumentSharingInsertReq;
|
|
|
+import com.migao.entity.vo.req.DocumentSharingQueryReq;
|
|
|
+import com.migao.entity.vo.req.DocumentSharingUpdateReq;
|
|
|
+import com.migao.entity.vo.res.DocumentSharingPageQueryRes;
|
|
|
+import com.migao.entity.vo.res.DocumentSharingQueryRes;
|
|
|
+import com.migao.service.DocumentSharingService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author dingsong
|
|
|
+ */
|
|
|
+@Api(tags = "006.文档共享模快")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/documentSharing")
|
|
|
+public class DocumentSharingController {
|
|
|
+ @Resource
|
|
|
+ DocumentSharingService documentSharingService;
|
|
|
+
|
|
|
+ @ApiOperation("导入文档")
|
|
|
+ @PostMapping(value = "/insert")
|
|
|
+ public ResponseBean<?> insert(@RequestBody DocumentSharingInsertReq doc){
|
|
|
+ return documentSharingService.insert(doc);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("删除")
|
|
|
+ @PostMapping(value = "/deleteById")
|
|
|
+ public ResponseBean<?> deleteById(@RequestParam String id) {
|
|
|
+ return documentSharingService.deleteById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("更新")
|
|
|
+ @PostMapping(value = "/update")
|
|
|
+ public ResponseBean<?> update(@RequestBody DocumentSharingUpdateReq documentSharingUpdateReq) {
|
|
|
+ return documentSharingService.update(documentSharingUpdateReq);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("查看详情")
|
|
|
+ @PostMapping(value = "/findById")
|
|
|
+ public ResponseBean<DocumentSharingQueryRes> findById(@RequestParam String id) {
|
|
|
+ return documentSharingService.findById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("分页查看所有数据")
|
|
|
+ @PostMapping(value = "/pageQueryAll")
|
|
|
+ public ResponseBean<PageBeanOne<DocumentSharingPageQueryRes>> pageQueryAll(@RequestBody BasePageRequest basePageRequest) {
|
|
|
+ return documentSharingService.pageQueryAll(basePageRequest);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("分页查看当前用户数据")
|
|
|
+ @PostMapping(value = "/pageQueryById")
|
|
|
+ public ResponseBean<PageBeanOne<DocumentSharingPageQueryRes>> pageQueryById(@RequestBody BasePageRequest basePageRequest) {
|
|
|
+ return documentSharingService.pageQueryById(basePageRequest);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("分页模糊查询所有数据")
|
|
|
+ @PostMapping(value = "/pageQueryOne")
|
|
|
+ public ResponseBean<PageBeanOne<DocumentSharingPageQueryRes>> pageQueryOne(@RequestBody DocumentSharingQueryReq documentSharingQuery) {
|
|
|
+ return documentSharingService.pageQueryOne(documentSharingQuery);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("分页模糊查询当前用户数据")
|
|
|
+ @PostMapping(value = "/pageQueryOneById")
|
|
|
+ public ResponseBean<PageBeanOne<DocumentSharingPageQueryRes>> pageQueryOneById(@RequestBody DocumentSharingQueryReq documentSharingQuery) {
|
|
|
+ return documentSharingService.pageQueryOneById(documentSharingQuery);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("下载单个文档")
|
|
|
+ @PostMapping(value = "/download")
|
|
|
+ public ResponseBean<?> download(HttpServletResponse response, @RequestParam String id){
|
|
|
+ return documentSharingService.download(response,id);
|
|
|
+ }
|
|
|
+}
|