| | |
| | | */ |
| | | @PostMapping("/screenShot") |
| | | public ResponseVO<Object> screenShot(@RequestBody VnnoxParam vnnoxWebRequest) { |
| | | if (!permissionConfig.check(MenuEnum.VNNOX_SCREENSHOT.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | Map<String, String> map = vnnoxService.getScreenShotUrl(vnnoxWebRequest.getId()); |
| | | if (map.get("code").equals("500")) { |
| | | return ResponseUtil.fail(map.get("msg")); |
| | |
| | | */ |
| | | @PostMapping("/reboot") |
| | | public ResponseVO<Object> reboot(@RequestBody List<String> vnnoxWebRequest) { |
| | | if (!permissionConfig.check(MenuEnum.VNNOX_RESTART.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | VnnoxResult vnnoxResult = vnnoxService.reboot(vnnoxWebRequest); |
| | | return ResponseUtil.success(vnnoxResult); |
| | | } |
| | |
| | | @AnonymousAccess |
| | | @PostMapping("/syncPlay") |
| | | public ResponseVO<Object> syncPlay(@RequestBody Map map) { |
| | | List playIdlist = (List)map.get("playIdlist"); |
| | | if (!permissionConfig.check(MenuEnum.VNNOX_SYNC_PLAY.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | List playIdlist = (List) map.get("playIdlist"); |
| | | Integer option = (Integer) map.get("option"); |
| | | VnnoxResult vnnoxResult = vnnoxService.syncPlay(playIdlist,option); |
| | | VnnoxResult vnnoxResult = vnnoxService.syncPlay(playIdlist, option); |
| | | return ResponseUtil.success(vnnoxResult); |
| | | } |
| | | |
| | |
| | | @AnonymousAccess |
| | | @PostMapping("/ntp") |
| | | public ResponseVO<Object> ntp(@RequestBody Map map) { |
| | | boolean enable = (boolean)map.get("enable"); |
| | | List playIdlist = (List)map.get("playIdlist"); |
| | | VnnoxResult vnnoxResult = vnnoxService.ntpSync(playIdlist,enable); |
| | | if (!permissionConfig.check(MenuEnum.VNNOX_NTP.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | boolean enable = (boolean) map.get("enable"); |
| | | List playIdlist = (List) map.get("playIdlist"); |
| | | VnnoxResult vnnoxResult = vnnoxService.ntpSync(playIdlist, enable); |
| | | return ResponseUtil.success(vnnoxResult); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/screenStatusChange") |
| | | public ResponseVO<Object> screenStatusChange(@RequestBody VnnoxParam vnnoxWebRequest) { |
| | | if (!permissionConfig.check(MenuEnum.VNNOX_ON_OFF.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | VnnoxResult vnnoxResult = vnnoxService.screenStatusChange(vnnoxWebRequest.getPlayerList(), vnnoxWebRequest.getScreenStatus()); |
| | | return ResponseUtil.success(vnnoxResult); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/volChange") |
| | | public ResponseVO<Object> volChange(@RequestBody VnnoxParam vnnoxWebRequest) { |
| | | if (!permissionConfig.check(MenuEnum.VNNOX_VOL_CHANGE.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | VnnoxResult vnnoxResult = vnnoxService.volChange(vnnoxWebRequest.getPlayerList(), vnnoxWebRequest.getVol()); |
| | | return ResponseUtil.success(vnnoxResult); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/brightnessChange") |
| | | public ResponseVO<Object> brightnessChange(@RequestBody VnnoxParam vnnoxWebRequest) { |
| | | if (!permissionConfig.check(MenuEnum.VNNOX_BRIGHTNESS_CHANGE.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | VnnoxResult vnnoxResult = vnnoxService.brightnessChange(vnnoxWebRequest.getPlayerList(), vnnoxWebRequest.getBrightness()); |
| | | return ResponseUtil.success(vnnoxResult); |
| | | } |
| | |
| | | |
| | | @PostMapping("/validateSN") |
| | | public ResponseVO<Object> validateSN(@RequestBody Map map) throws URISyntaxException { |
| | | if (!permissionConfig.check(MenuEnum.VNNOX_ADD.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | String sn = (String) map.get("sn"); |
| | | String name = (String) map.get("name"); |
| | | LedV2RegisterResultEntity ledV2RegisterResultEntity = vnnoxService.validateSN(name, sn); |
| | |
| | | |
| | | @PostMapping("/updateLedName/{id}") |
| | | public ResponseVO<Object> updateLedName(@PathVariable Long id, @RequestBody Map map) { |
| | | if (!permissionConfig.check(MenuEnum.VNNOX_NAME_UPDATE.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | String name = (String) map.get("name"); |
| | | boolean b = vnnoxService.updateDataName(id, name); |
| | | if (b) { |
| | |
| | | |
| | | @GetMapping("/onLineList") |
| | | public ResponseVO<Object> onLineList(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) { |
| | | |
| | | List<LedPlayerEntity> list = ledPlayerEntityService.ledPlayerEntityList(baseConditionVO, keyword); |
| | | List<LedPlayerEntity> entities = vnnoxService.setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list)); |
| | | List<LedPlayerEntity> online = new ArrayList<>(); |
| | | for (LedPlayerEntity ledPlayer : entities) { |
| | | if (ledPlayer.getOnlineStatus() == 1) { |
| | | online.add(ledPlayer); |
| | | } |
| | | if (!permissionConfig.check(MenuEnum.LED_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | List<LedPlayerEntity> list = ledPlayerEntityService.ledPlayerEntityList(baseConditionVO, keyword); |
| | | List<LedPlayerEntity> entities = vnnoxService.setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list)); |
| | | List<LedPlayerEntity> online = new ArrayList<>(); |
| | | for (LedPlayerEntity ledPlayer : entities) { |
| | | if (ledPlayer.getOnlineStatus() == 1) { |
| | | online.add(ledPlayer); |
| | | } |
| | | return ResponseUtil.success(online); |
| | | } |
| | | return ResponseUtil.success(online); |
| | | |
| | | } |
| | | |