| | |
| | | querywrapper -> { |
| | | querywrapper.like(LedPlayerEntity::getName, keyword); |
| | | } |
| | | ).or( |
| | | sn->{ |
| | | sn.like(LedPlayerEntity::getSn,keyword); |
| | | } |
| | | ); |
| | | List<LedPlayerEntity> list = ledPlayerEntityService.list(wrapper); |
| | | List<LedPlayerEntity> entities = vnnoxService.setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list)); |
| | | entities.forEach( |
| | | led->{ |
| | | led -> { |
| | | PoleBinding binding = bindingService.getOne(Wrappers.lambdaQuery(PoleBinding.class) |
| | | .eq(PoleBinding::getDeviceType, 1).eq(PoleBinding::getDeviceCode, led.getSn())); |
| | | if(binding!=null){ |
| | | if (binding != null) { |
| | | led.setPoleId(poleService.getById(binding.getPoleId()).getId()); |
| | | led.setPoleName(poleService.getById(binding.getPoleId()).getPoleName()); |
| | | } |
| | |
| | | return ResponseUtil.success(online); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/getVnnoxInfo/{sn}") |
| | | public ResponseVO<Object> getBySnAndPlayerId(@PathVariable String sn) { |
| | | return ResponseUtil.success(ledPlayerEntityService.getBySnAndPlayerSn(sn)); |
| | | } |
| | | } |