UserGroupController.java
2.22 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
package com.objecteye.controller;
import com.objecteye.common.CommonResult;
import com.objecteye.service.IUserGroupService;
import com.objecteye.utils.GlobalUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@RestController
@RequestMapping("userGroup")
@CrossOrigin
@Api(value = "UserGroupController", description = "用户组")
public class UserGroupController extends BasicController {
@Autowired
private IUserGroupService iUserGroupService;
@ApiOperation("分页查询")
@RequestMapping(value = "findByPage", method = RequestMethod.POST, produces = GlobalUtil.COMMON_HEADER_CONTENT_TYPE)
public CommonResult findByPage(@RequestBody Map<String, Object> requestMap) {
return pageResultHandle(iUserGroupService.findByPage(requestMap));
}
@ApiOperation("检查用户组是否存在")
@RequestMapping(value = "checkGroup", method = RequestMethod.POST, produces = GlobalUtil.COMMON_HEADER_CONTENT_TYPE)
public CommonResult checkGroup(@RequestBody Map<String, Object> requestMap) {
return jsonObjectResultHandle(iUserGroupService.checkGroup(requestMap));
}
@ApiOperation("添加用户组")
@RequestMapping(value = "addGroup", method = RequestMethod.POST, produces = GlobalUtil.COMMON_HEADER_CONTENT_TYPE)
public CommonResult addGroup(@RequestBody Map<String, Object> requestMap) {
return jsonObjectResultHandle(iUserGroupService.addGroup(requestMap));
}
@ApiOperation("更新用户组")
@RequestMapping(value = "updateGroup", method = RequestMethod.POST, produces = GlobalUtil.COMMON_HEADER_CONTENT_TYPE)
public CommonResult updateGroup(@RequestBody Map<String, Object> requestMap) {
return jsonObjectResultHandle(iUserGroupService.updateGroup(requestMap));
}
@ApiOperation("删除用户组")
@RequestMapping(value = "deleteGroup", method = RequestMethod.POST, produces = GlobalUtil.COMMON_HEADER_CONTENT_TYPE)
public CommonResult deleteGroup(@RequestBody Map<String, Object> requestMap) {
return jsonObjectResultHandle(iUserGroupService.deleteGroup(requestMap));
}
}