| | |
| | | |
| | | @PostMapping("/add") |
| | | public ResponseVO<Object> addClient(@RequestBody @Validated AddClientPrarm addClientPrarm) { |
| | | if (!permissionConfig.check(MenuEnum.CLIENT_ADD.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | boolean b = clientService.addClient(addClientPrarm); |
| | | if (b) { |
| | | return ResponseUtil.success("添加成功"); |
| | |
| | | |
| | | @PostMapping("/update/{id}") |
| | | public ResponseVO<Object> updateClient(@PathVariable Long id, @RequestBody @Validated UpdateClientPrarm updateClientPrarm) { |
| | | if (!permissionConfig.check(MenuEnum.CLIENT_INFO_UPDATE.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | boolean b = clientService.updateClient(id, updateClientPrarm); |
| | | if (b) { |
| | | return ResponseUtil.success("更新成功"); |
| | |
| | | |
| | | @PostMapping("/delete/{id}") |
| | | public ResponseVO<Object> deleteClient(@PathVariable Long id) { |
| | | if (!permissionConfig.check(MenuEnum.CLIENT_DELETE.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | boolean b = clientService.deleteClient(id); |
| | | if (b) { |
| | | return ResponseUtil.success("删除成功"); |