| | |
| | | package com.sandu.ximon.admin.controller; |
| | | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.sandu.common.domain.ResponseVO; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | | import com.sandu.common.util.ResponseUtil; |
| | | import com.sandu.ximon.admin.param.PoleGroupParam; |
| | | import com.sandu.ximon.admin.param.PoleGroupRelationParam; |
| | |
| | | |
| | | private final PoleGroupService poleGroupService; |
| | | |
| | | @GetMapping("/add") |
| | | @PostMapping("/add") |
| | | public ResponseVO<Object> addGroup(@RequestBody @Validated PoleGroupParam param) { |
| | | return ResponseUtil.success(poleGroupService.addGroup(param)); |
| | | } |
| | |
| | | return ResponseUtil.success(poleGroupService.updateGroup(groupId, param)); |
| | | } |
| | | |
| | | @GetMapping("/delete/{groupId}") |
| | | @PostMapping("/delete/{groupId}") |
| | | public ResponseVO<Object> delGroup(@PathVariable Long groupId) { |
| | | return ResponseUtil.success(poleGroupService.deleteGroup(groupId)); |
| | | } |
| | | |
| | | @PostMapping("/list") |
| | | public ResponseVO<Object> listGroup() { |
| | | return ResponseUtil.success(poleGroupService.groupList()); |
| | | @GetMapping("/list") |
| | | public ResponseVO<Object> listGroup(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword, |
| | | @RequestParam(value = "groupid", required = false) Long groupid) { |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | return ResponseUtil.success(poleGroupService.groupList(baseConditionVO,keyword,groupid)); |
| | | } |
| | | |
| | | @PostMapping("/bind/{groupId}") |