2021与蓝度共同重构项目,服务端
zhanzhiqin
2022-04-18 66080a0b82181aaa567e8080ee2b82315b840930
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/XiXunController.java
@@ -115,31 +115,10 @@
        if (!permissionConfig.check(MenuEnum.LED_PROGRAM_LIST.getCode())) {
            return ResponseUtil.fail("缺少对应用户权限");
        }
        LambdaQueryWrapper<PoleXixunPlayerEntity> wrapper = xiXunPlayerService.XixunPlayerList(keyword);
        PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize());
        LambdaQueryWrapper<PoleXixunPlayerEntity> wrapper = Wrappers.lambdaQuery(PoleXixunPlayerEntity.class).like(PoleXixunPlayerEntity::getProgramName, keyword);
//        if(AdministratorEnums.CUSTOMER.getCode().equals(SecurityUtils.getAdministratorIdentity())){
//            boolean clientId = clientService.findClientId();
//            if(clientId){
//                wrapper= wrapper.eq(PoleXixunPlayerEntity::getUserId,SecurityUtils.getUserId());
//            }
//            wrapper= wrapper.eq(PoleXixunPlayerEntity::getClientId,clientService.getClientId());
//        }
//        wrapper=Wrappers.lambdaQuery(PoleXixunPlayerEntity.class);
//        if(StrUtil.isNotBlank(keyword)){
//            wrapper.like(PoleXixunPlayerEntity::getLightemitName,keyword).or(
//                    lambdaQueryWrapper -> {
//                        lambdaQueryWrapper.like(PoleXixunPlayerEntity::getLightemitControlCode, keyword);
//                    }
//            );
//        }
//        return ResponseUtil.success(poleLightemitService.list(wrapper));
        if (AdministratorEnums.CUSTOMER.getCode().equals(SecurityUtils.getAdministratorIdentity())) {
            return ResponseUtil.success(xiXunPlayerService.list(wrapper)); //  todo
        } else {
            return ResponseUtil.success(xiXunPlayerService.list(wrapper));
        }
        return ResponseUtil.success(xiXunPlayerService.list(wrapper));
    }
@@ -303,13 +282,11 @@
    }
    /**
     *
     *
     * @param
     * @return
     */
    @GetMapping("/getbycode")
  public ResponseVO<Object> getLedByLightControlCode(String lightemitControlCode) {
    public ResponseVO<Object> getLedByLightControlCode(String lightemitControlCode) {
        return ResponseUtil.success(poleLightemitService.getLedByLightControlCode(lightemitControlCode));
    }
@@ -471,8 +448,6 @@
        scheduleService.ledschedulepush(id, lightemitIds);
        return ResponseUtil.success("设置成功");
    }
}