|  |  | 
 |  |  |     @PostMapping("/create") | 
 |  |  |     @CloudRequiredPermission("business:ywpatrolline:create") | 
 |  |  |     public ApiResponse create(@RequestBody YwPatrolLine ywPatrolLine,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         ywPatrolLine.setLoginUserInfo(this.getLoginUser(token)); | 
 |  |  |         return ApiResponse.success(ywPatrolLineService.create(ywPatrolLine)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     @GetMapping("/delete/{id}") | 
 |  |  |     @CloudRequiredPermission("business:ywpatrolline:delete") | 
 |  |  |     public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         ywPatrolLineService.deleteById(id); | 
 |  |  |         ywPatrolLineService.deleteById(id,this.getLoginUser(token)); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |         for (String id : idArray) { | 
 |  |  |             idList.add(Integer.valueOf(id)); | 
 |  |  |         } | 
 |  |  |         ywPatrolLineService.deleteByIdInBatch(idList); | 
 |  |  |         ywPatrolLineService.deleteByIdInBatch(idList,this.getLoginUser(token)); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     @PostMapping("/updateById") | 
 |  |  |     @CloudRequiredPermission("business:ywpatrolline:update") | 
 |  |  |     public ApiResponse updateById(@RequestBody YwPatrolLine ywPatrolLine,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         ywPatrolLine.setLoginUserInfo(this.getLoginUser(token)); | 
 |  |  |         ywPatrolLineService.updateById(ywPatrolLine); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("更新状态") | 
 |  |  |     @PostMapping("/updateStatusById") | 
 |  |  |     @CloudRequiredPermission("business:ywpatrolline:update") | 
 |  |  |     public ApiResponse updateStatusById(@RequestBody YwPatrolLine ywPatrolLine,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         ywPatrolLine.setLoginUserInfo(this.getLoginUser(token)); | 
 |  |  |         ywPatrolLineService.updateStatusById(ywPatrolLine); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     @PostMapping("/page") | 
 |  |  |     @CloudRequiredPermission("business:ywpatrolline:query") | 
 |  |  |     public ApiResponse<PageData<YwPatrolLine>> findPage (@RequestBody PageWrap<YwPatrolLine> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); | 
 |  |  |         return ApiResponse.success(ywPatrolLineService.findPage(pageWrap)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     @PostMapping("/exportExcel") | 
 |  |  |     @CloudRequiredPermission("business:ywpatrolline:exportExcel") | 
 |  |  |     public void exportExcel (@RequestBody PageWrap<YwPatrolLine> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); | 
 |  |  |         ExcelExporter.build(YwPatrolLine.class).export(ywPatrolLineService.findPage(pageWrap).getRecords(), "运维巡检路线信息表", response); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     @GetMapping("/{id}") | 
 |  |  |     @CloudRequiredPermission("business:ywpatrolline:query") | 
 |  |  |     public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         return ApiResponse.success(ywPatrolLineService.findById(id)); | 
 |  |  |         return ApiResponse.success(ywPatrolLineService.getDetail(id)); | 
 |  |  |     } | 
 |  |  | } |