| | |
| | | |
| | | private final ClientService clientService; |
| | | |
| | | @PostMapping("/add") |
| | | @GetMapping("/add") |
| | | public ResponseVO<Object> addClient(@RequestBody ClientPrarm clientPrarm){ |
| | | boolean b = clientService.addClient(clientPrarm); |
| | | if(b){ |
| | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/update/{id}") |
| | | @GetMapping ("/update/{id}") |
| | | public ResponseVO<Object> updateClient(@PathVariable Long id,@RequestBody ClientPrarm clientPrarm){ |
| | | boolean b = clientService.updateClient(id,clientPrarm); |
| | | if(b){ |
| | |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/delete/{id}") |
| | | @GetMapping("/delete/{id}") |
| | | public ResponseVO<Object> deleteClient(@PathVariable Long id){ |
| | | boolean b = clientService.deleteClient(id); |
| | | if(b){ |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping("/list") |
| | | @PostMapping("/list") |
| | | public ResponseVO<Object> listClient(){ |
| | | Integer administratorIdentity = SecurityUtils.getAdministratorIdentity();//0 为管理员 |
| | | if(administratorIdentity==0){//判断 如果是管理员 就判断下CustomerInspectContextHolder.getCustomerId() 有没有值 |