DgArchivesDestructionController.java
2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package com.pashanhoo.destroy.controller;
import com.pashanhoo.common.Result;
import com.pashanhoo.destroy.entity.vo.AddDgArchivesDestructionRequest;
import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionSearchRequest;
import com.pashanhoo.destroy.entity.vo.UpdateDgArchivesDestructionRequest;
import com.pashanhoo.destroy.service.DgArchivesDestructionService;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* <p>
* 档案销毁 前端控制器
* </p>
*
* @author
* @since 2021-11-05
*/
@RestController
@RequestMapping("/system/dgArchivesDestruction/")
@Api(tags = "档案销毁接口")
public class DgArchivesDestructionController {
@Autowired
private DgArchivesDestructionService dgarchivesdestructionService;
@PostMapping("insertDgArchivesDestruction")
@ApiOperation("新增档案销毁")
public Result insertDgArchivesDestruction(@RequestBody AddDgArchivesDestructionRequest request) {
if (dgarchivesdestructionService.insertDgArchivesDestruction(request)) {
return Result.ok();
}
return Result.error("新增失败");
}
@DeleteMapping("deleteDgArchivesDestructionByIds")
@ApiOperation(value = "批量删除档案销毁")
public Result deleteDgArchivesDestructionByIds(@ApiParam("档案销毁ID列表") @RequestParam(value = "idList") List<String> idList) {
if (dgarchivesdestructionService.removeByIds(idList)) {
return Result.ok("删除成功");
}
return Result.error("删除失败");
}
@PutMapping("updateDgArchivesDestruction")
@ApiOperation("修改档案销毁")
public Result updateDgArchivesDestruction(@RequestBody UpdateDgArchivesDestructionRequest request) {
if (dgarchivesdestructionService.updateDgArchivesDestruction(request)) {
return Result.ok("修改成功");
}
return Result.error("修改失败");
}
@GetMapping("getDgArchivesDestructionDetailById")
@ApiOperation(value = "读取明细")
public Result getDgArchivesDestructionDetailById(@ApiParam("档案销毁ID") @RequestParam String id) {
return Result.ok(dgarchivesdestructionService.getDgArchivesDestructionDetailById(id));
}
@PostMapping("search")
@ApiOperation(value = "根据条件进行列表查询")
public Result searchDgArchivesDestructionList(@RequestBody DgArchivesDestructionSearchRequest request) {
//TODO 默认排序条件设置
request.defaultFillPageProp("", "");
return Result.ok(dgarchivesdestructionService.searchDgArchivesDestructionList(request));
}
}