| | |
| | | package org.jeecg.modules.dnc.controller; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.jeecg.modules.dnc.request.DocInfoUploadRequest; |
| | | import org.jeecg.modules.dnc.response.CommonCode; |
| | | import org.jeecg.modules.dnc.response.QueryListResponseResult; |
| | | import org.jeecg.modules.dnc.response.QueryPageResponseResult; |
| | | import org.jeecg.modules.dnc.response.ResponseResult; |
| | | import org.jeecg.modules.dnc.service.IDocInfoService; |
| | | import org.jeecg.modules.dnc.utils.ValidateUtil; |
| | |
| | | |
| | | @AutoLog(value = "文档表-删除文档信息") |
| | | @ApiOperation(value = "文档表-删除文档信息", notes = "文档表-删除文档信息") |
| | | @DeleteMapping("/delete") |
| | | public ResponseResult deleteDocInfo(@RequestParam("id") String id) { |
| | | boolean b = docInfoService.deleteDocInfo(id); |
| | | @DeleteMapping("/delete/{id}/{attrType}/{attrId}") |
| | | public ResponseResult deleteDocInfo(@PathVariable("id") String id, @PathVariable("attrType") String attrType, @PathVariable("attrId") String attrId) { |
| | | boolean b = docInfoService.deleteDocInfo(id,attrType,attrId); |
| | | if(!b) |
| | | return new ResponseResult(CommonCode.FAIL); |
| | | return new ResponseResult(CommonCode.SUCCESS); |
| | |
| | | @AutoLog(value = "文件表-查询可指派的文档信息列表") |
| | | @ApiOperation(value = "文件表-查询可指派的文档信息列表", notes = "文件表-查询可指派的文档信息列表") |
| | | @GetMapping("/find/list") |
| | | public QueryListResponseResult<DocInfo> findList(DocInfoQueryRequest docQuery) { |
| | | return docInfoService.findList(docQuery); |
| | | public Result<?> findList(DocInfoQueryRequest docQuery) { |
| | | List<DocInfo> docInfoList=docInfoService.findList(docQuery); |
| | | return Result.ok(docInfoList); |
| | | } |
| | | |
| | | @AutoLog(value = "文件表-批量删除文档接口") |
| | | @ApiOperation(value = "文件表-批量删除文档接口", notes = "文件表-批量删除文档接口") |
| | | @PostMapping("/batch/remove") |
| | | public ResponseResult batchRemoveDocInfo(@RequestBody String[] docIds) { |
| | | boolean b = docInfoService.batchRemoveDocInfo(docIds); |
| | | @PostMapping("/batch/remove/{docIds}/{attrType}/{attrId}") |
| | | public ResponseResult batchRemoveDocInfo(@PathVariable("docIds") String[] docIds, @PathVariable("attrType") String attrType, @PathVariable("attrId") String attrId) { |
| | | boolean b = docInfoService.batchRemoveDocInfo(docIds,attrType,attrId); |
| | | if(!b) |
| | | return new ResponseResult(CommonCode.FAIL); |
| | | return new ResponseResult(CommonCode.SUCCESS); |