|  |  | 
 |  |  | import com.doumee.service.business.impl.hksync.HkSyncPushServiceImpl; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | import io.swagger.annotations.ApiOperation; | 
 |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.web.bind.annotation.*; | 
 |  |  |  | 
 |  |  | 
 |  |  |     @PreventRepeat | 
 |  |  |     @ApiOperation("【海康】全量同步门禁设备接口") | 
 |  |  |     @PostMapping("/syncDevices") | 
 |  |  | //    @RequiresPermissions("business:hksync:device") | 
 |  |  |     @RequiresPermissions("business:hksync:device") | 
 |  |  |     public ApiResponse syncHkDevices(@RequestBody AcsDeviceListRequest param) { | 
 |  |  |         String result = hkSyncDeviceService.syncHkDevices(param); | 
 |  |  |         return ApiResponse.success(result); | 
 |  |  | 
 |  |  |     @PreventRepeat | 
 |  |  |     @ApiOperation("【海康】全量同步停车库接口") | 
 |  |  |     @PostMapping("/syncParks") | 
 |  |  | //    @RequiresPermissions("business:hksync:park") | 
 |  |  |     @RequiresPermissions("business:hksync:park") | 
 |  |  |     public ApiResponse syncHkParks(@RequestBody ParkListRequest param) { | 
 |  |  |         String result = hkSyncParkService.syncHkParks(param); | 
 |  |  |         return ApiResponse.success(result); | 
 |  |  | 
 |  |  |     @PreventRepeat | 
 |  |  |     @ApiOperation("【海康】全量同步访客权限组接口") | 
 |  |  |     @PostMapping("/syncPrivilege") | 
 |  |  | //    @RequiresPermissions("business:hksync:privilege") | 
 |  |  |     @RequiresPermissions("business:hksync:privilege") | 
 |  |  |     public ApiResponse syncPrivilege(@RequestBody PrivilegeGroupRequest param) { | 
 |  |  |         String result = hkSyncPrivilegeService.syncPrivilege(param); | 
 |  |  |         return ApiResponse.success(result); | 
 |  |  | 
 |  |  |     @ApiOperation("【海康】门禁事件订阅推送对接处理接口") | 
 |  |  |     @PostMapping("/push/acs") | 
 |  |  |     public ApiResponse pushAcs(  HttpServletRequest request,@RequestBody EventAcsRequest param, HttpServletResponse response) { | 
 |  |  |        /* try { | 
 |  |  |             BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream(),"UTF-8")); | 
 |  |  |             String line = null; | 
 |  |  |             StringBuffer sb = new StringBuffer(); | 
 |  |  |             while (true) { | 
 |  |  |                 if (!((line = br.readLine()) != null)) break; | 
 |  |  |  | 
 |  |  |                 sb.append(line); | 
 |  |  |             } | 
 |  |  |             System.out.println(sb.toString()); | 
 |  |  |         } catch (IOException e) { | 
 |  |  |                 throw new RuntimeException(e); | 
 |  |  |         }*/ | 
 |  |  |         String result = hkSyncPushService.dealAcsEvent(param,response); | 
 |  |  |         return ApiResponse.success(result); | 
 |  |  |     } |