| | |
| | | public class InterphoneSubController { |
| | | |
| | | |
| | | |
| | | private final InterphoneSubService interphoneSubService; |
| | | |
| | | /** |
| | | * 新增子设备 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public ResponseVO<Object> addSub(@RequestBody InterphoneSubParam interphoneSubParam){ |
| | | public ResponseVO<Object> addSub(@RequestBody InterphoneSubParam interphoneSubParam) { |
| | | return ResponseUtil.success(interphoneSubService.addSub(interphoneSubParam)); |
| | | } |
| | | |
| | |
| | | * 修改子设备 |
| | | */ |
| | | @PostMapping("/update/{id}") |
| | | public ResponseVO<Object> updateSub(@PathVariable Integer id, @RequestBody InterphoneSubParam interphoneSubParam){ |
| | | return ResponseUtil.success(interphoneSubService.updateSub(id,interphoneSubParam)); |
| | | public ResponseVO<Object> updateSub(@PathVariable Integer id, @RequestBody InterphoneSubParam interphoneSubParam) { |
| | | return ResponseUtil.success(interphoneSubService.updateSub(id, interphoneSubParam)); |
| | | } |
| | | |
| | | /** |
| | | * 删除子设备 |
| | | */ |
| | | @PostMapping("/delete/{id}") |
| | | public ResponseVO<Object> deleteSub(@PathVariable Integer id){ |
| | | public ResponseVO<Object> deleteSub(@PathVariable Integer id) { |
| | | return ResponseUtil.success(interphoneSubService.deleteSub(id)); |
| | | } |
| | | |
| | |
| | | * 子设备详情 |
| | | */ |
| | | @GetMapping("/detail/{id}") |
| | | public ResponseVO<Object> detailSub(@PathVariable Integer id){ |
| | | public ResponseVO<Object> detailSub(@PathVariable Integer id) { |
| | | return ResponseUtil.success(interphoneSubService.getSub(id)); |
| | | } |
| | | |