2021与蓝度共同重构项目,服务端
zhanzhiqin
2022-04-18 31c23ba25866604c2688bcef9d1207b7f471e88a
ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedScheduleService.java
@@ -136,20 +136,27 @@
    }
    /**
     * 播放计划列表(熙讯)
     *
     * @param baseConditionVO
     * @param keyword
     * @return
     */
    public List listSchedule(BaseConditionVO baseConditionVO, String keyword) {
        LambdaQueryWrapper<LedScheduleEntity> eq = new LambdaQueryWrapper<>();
        PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize());
        if (SecurityUtils.getClientId() != null && clientService.findClientId()) {
            eq = Wrappers.lambdaQuery(LedScheduleEntity.class).eq(LedScheduleEntity::getUserId, SecurityUtils.getUserId());
        } else if (SecurityUtils.getClientId() != null && !clientService.findClientId()) {
            eq = Wrappers.lambdaQuery(LedScheduleEntity.class).eq(LedScheduleEntity::getClientId, SecurityUtils.getUserId());
        } else {
            eq = Wrappers.lambdaQuery(LedScheduleEntity.class);
        LambdaQueryWrapper<LedScheduleEntity> eq = Wrappers.lambdaQuery(LedScheduleEntity.class);
        //用户类型判断
        if (SecurityUtils.getClientId() != null) {
            eq = eq.eq(LedScheduleEntity::getUserId, SecurityUtils.getUserId()).or(w -> {
                w.eq(LedScheduleEntity::getClientId, SecurityUtils.getUserId());
            });
        }
        //模糊查询关键字判断
        if (!keyword.isEmpty()) {
            eq = eq.like(LedScheduleEntity::getName, keyword);
        }
        PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize());
        return list(eq);
    }