|
@ -6,7 +6,9 @@ import java.util.Map;
|
6
|
6
|
|
7
|
7
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
8
|
8
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
9
|
import org.springframework.web.bind.annotation.GetMapping;
|
9
|
10
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
11
|
import org.springframework.web.bind.annotation.PostMapping;
|
10
|
12
|
import org.springframework.web.bind.annotation.RequestBody;
|
11
|
13
|
import org.springframework.web.bind.annotation.RequestMapping;
|
12
|
14
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
@ -34,7 +36,7 @@ public class MeetingController {
|
34
|
36
|
/**
|
35
|
37
|
* 列表
|
36
|
38
|
*/
|
37
|
|
@RequestMapping("/list")
|
|
39
|
@GetMapping("/list")
|
38
|
40
|
@RequiresPermissions("admin:meeting:list")
|
39
|
41
|
public R list(@RequestParam Map<String, Object> params){
|
40
|
42
|
PageUtils page = meetingService.queryPage(params);
|
|
@ -45,7 +47,7 @@ public class MeetingController {
|
45
|
47
|
/**
|
46
|
48
|
* 信息
|
47
|
49
|
*/
|
48
|
|
@RequestMapping("/info/{id}")
|
|
50
|
@GetMapping("/info/{id}")
|
49
|
51
|
@RequiresPermissions("admin:meeting:info")
|
50
|
52
|
public R info(@PathVariable("id") Long id){
|
51
|
53
|
MeetingEntity meeting = meetingService.getById(id);
|
|
@ -56,7 +58,7 @@ public class MeetingController {
|
56
|
58
|
/**
|
57
|
59
|
* 保存
|
58
|
60
|
*/
|
59
|
|
@RequestMapping("/save")
|
|
61
|
@PostMapping("/save")
|
60
|
62
|
@RequiresPermissions("admin:meeting:save")
|
61
|
63
|
public R save(@RequestBody MeetingEntity meeting){
|
62
|
64
|
meeting.setCreateTime(new Date());
|
|
@ -68,7 +70,7 @@ public class MeetingController {
|
68
|
70
|
/**
|
69
|
71
|
* 修改
|
70
|
72
|
*/
|
71
|
|
@RequestMapping("/update")
|
|
73
|
@PostMapping("/update")
|
72
|
74
|
@RequiresPermissions("admin:meeting:update")
|
73
|
75
|
public R update(@RequestBody MeetingEntity meeting){
|
74
|
76
|
meeting.setModifyTime(new Date());
|
|
@ -80,7 +82,7 @@ public class MeetingController {
|
80
|
82
|
/**
|
81
|
83
|
* 删除
|
82
|
84
|
*/
|
83
|
|
@RequestMapping("/delete")
|
|
85
|
@PostMapping("/delete")
|
84
|
86
|
@RequiresPermissions("admin:meeting:delete")
|
85
|
87
|
public R delete(@RequestBody Long[] ids){
|
86
|
88
|
meetingService.removeByIds(Arrays.asList(ids));
|
|
@ -88,4 +90,34 @@ public class MeetingController {
|
88
|
90
|
return R.ok();
|
89
|
91
|
}
|
90
|
92
|
|
|
93
|
/**
|
|
94
|
* 列表
|
|
95
|
*/
|
|
96
|
@GetMapping("/listbranch")
|
|
97
|
@RequiresPermissions("admin:meeting:list")
|
|
98
|
public R listBranch(@RequestParam Map<String, Object> params){
|
|
99
|
if (!params.containsKey("meetingId")){
|
|
100
|
return R.error("会议id不能为空");
|
|
101
|
}
|
|
102
|
|
|
103
|
PageUtils page = meetingService.queryPage(params);
|
|
104
|
|
|
105
|
return R.ok().put("page", page);
|
|
106
|
}
|
|
107
|
|
|
108
|
/**
|
|
109
|
* 保存分会
|
|
110
|
*/
|
|
111
|
@PostMapping("/savebranch")
|
|
112
|
@RequiresPermissions("admin:meeting:save")
|
|
113
|
public R saveBranch(@RequestBody MeetingEntity meeting){
|
|
114
|
if (meeting.getPid()==0L) {
|
|
115
|
return R.error("会议父id(pid)不能为空");
|
|
116
|
}
|
|
117
|
|
|
118
|
meeting.setCreateTime(new Date());
|
|
119
|
meetingService.save(meeting);
|
|
120
|
|
|
121
|
return R.ok();
|
|
122
|
}
|
91
|
123
|
}
|