| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.api.R; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.sandu.common.domain.ResponseVO; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | |
| | | @GetMapping("/screenShot") |
| | | public ResponseVO<Object> screenShot(@RequestBody VnnoxParam vnnoxWebRequest) { |
| | | Map<String, String> map = vnnoxService.getScreenShotUrl(vnnoxWebRequest.getId()); |
| | | if(map.get("code").equals("500")) { |
| | | return ResponseUtil.fail(map.get("msg")); |
| | | } |
| | | return ResponseUtil.success(map.get("url")); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * @param vnnoxWebRequest |
| | | * @return |
| | | * @return 开关屏幕 |
| | | */ |
| | | @GetMapping("/screenStatusChange") |
| | | public ResponseVO<Object> screenStatusChange(@RequestBody VnnoxParam vnnoxWebRequest) { |
| | |
| | | return ResponseUtil.success(vnnoxResult); |
| | | } |
| | | |
| | | /* @RequestMapping("/changeLedName") |
| | | public R changeLedName(@RequestBody VnnoxParam vnnoxWebRequest) { |
| | | vnnoxService.changeLedName(vnnoxWebRequest.getId(),vnnoxWebRequest.getPlayerName()); |
| | | return ResponseUtil.success(); |
| | | }*/ |
| | | |
| | | @PostMapping("/validateSN") |
| | | public ResponseVO<Object> validateSN(@RequestBody Map map) throws URISyntaxException { |
| | |
| | | //wrapper.eq(LedPlayerEntity::get) |
| | | return ResponseUtil.success(""); // todo |
| | | } else { |
| | | wrapper.like(LedPlayerEntity::getPlayerName, keyword); |
| | | wrapper.like(LedPlayerEntity::getPlayerName, keyword) |
| | | .or( |
| | | querywrapper->{ |
| | | querywrapper.like(LedPlayerEntity::getName, keyword); |
| | | } |
| | | ); |
| | | List<LedPlayerEntity> list = ledPlayerEntityService.list(wrapper); |
| | | List<LedPlayerEntity> entities = vnnoxAPIUtil.syncCurrentInfo(list); |
| | | List<LedPlayerEntity> entities = vnnoxService.setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list)); |
| | | return ResponseUtil.success(entities); |
| | | } |
| | | } |
| | |
| | | } else { |
| | | wrapper.like(LedPlayerEntity::getPlayerName, keyword); |
| | | List<LedPlayerEntity> list = ledPlayerEntityService.list(wrapper); |
| | | List<LedPlayerEntity> entities = vnnoxAPIUtil.syncCurrentInfo(list); |
| | | List<LedPlayerEntity> entities = vnnoxService.setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list)); |
| | | List<LedPlayerEntity> online = new ArrayList<>(); |
| | | for (LedPlayerEntity ledPlayer : entities) { |
| | | if (ledPlayer.getOnlineStatus() == 1) { |