|
@@ -1,13 +1,17 @@
|
|
|
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.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
@@ -22,9 +26,57 @@ public class DocumentSharingController {
|
|
|
@Resource
|
|
|
DocumentSharingService documentSharingService;
|
|
|
|
|
|
-// @ApiOperation("下载单个文档")
|
|
|
-// @PostMapping(value = "/download")
|
|
|
-// public ResponseBean<?> download(HttpServletResponse response, @RequestParam String id){
|
|
|
-//
|
|
|
-// }
|
|
|
+ @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);
|
|
|
+ }
|
|
|
}
|