LaborGroupDictController.java
2 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
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.model.LaborGroupDictDO;
import com.subsidy.service.LaborGroupDictService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
/**
* <p>
* 伙伴群组字典表 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-07-23
*/
@RestController
@Api(tags = "伙伴群组字典表")
@RequestMapping("/laborGroupDict")
public class LaborGroupDictController {
@Autowired
private LaborGroupDictService laborGroupDictService;
@PostMapping("allGroups")
@ApiOperation("查看所有群组+人数 laborId")
public ResponseVO allGroups(@RequestBody LaborGroupDictDO laborGroupDictDO){
return ResponseData.generateCreatedResponse(0,laborGroupDictService.allGroups(laborGroupDictDO));
}
@PostMapping("addGroup")
@ApiOperation("添加群组 laborId parentId 父节点id groupName")
public ResponseVO addGroup(@RequestBody LaborGroupDictDO laborGroupDictDO){
laborGroupDictService.addGroup(laborGroupDictDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("updateGroup")
@ApiOperation("修改群组 id groupName")
public ResponseVO updateGroup(@RequestBody LaborGroupDictDO laborGroupDictDO){
laborGroupDictService.updateGroup(laborGroupDictDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping("deleteGroup")
@ApiOperation("删除群组 id")
public ResponseVO deleteGroup(@RequestBody LaborGroupDictDO laborGroupDictDO){
laborGroupDictService.deleteGroup(laborGroupDictDO);
return ResponseData.generateCreatedResponse(0);
}
}