| | |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:platformjob:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | platformJobService.delete(id); |
| | | platformJobService.deleteById(id,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @GetMapping("/updateTotalNum") |
| | | @CloudRequiredPermission("business:platformjob:update") |
| | | public ApiResponse updateTotalNum(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | wmsService.computjobTotalNum(this.getIdList(ids)); |
| | | List<Integer> idList =this.getIdList(ids); |
| | | if(idList == null || idList.size()==0){ |
| | | idList = new ArrayList<>(); |
| | | PlatformJob param = new PlatformJob(); |
| | | param.setIsdeleted(Constants.ZERO); |
| | | param.setOrigin(Constants.ONE); |
| | | List<PlatformJob> list= platformJobService.findList(param); |
| | | |
| | | for(PlatformJob j :list){ |
| | | idList.add(j.getId()); |
| | | } |
| | | } |
| | | wmsService.computjobTotalNum(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |