dao/src/main/java/com/sandu/ximon/dao/domain/PlayPlanNv.java
@@ -31,6 +31,11 @@ private Long userId; /** * */ private Long clientId; /** * 播放计划名称 */ private String name; dao/src/main/resources/mapper/PlayPlanNvMapper.xml
@@ -7,6 +7,7 @@ <resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.PlayPlanNv"> <id property="id" column="id" jdbcType="BIGINT"/> <result property="userId" column="user_id" jdbcType="BIGINT"/> <result property="clientId" column="client_id" jdbcType="BIGINT"/> <result property="name" column="name" jdbcType="VARCHAR"/> <result property="ledProgramId" column="led_program_id" jdbcType="BIGINT"/> <result property="ledProgramName" column="led_program_name" jdbcType="VARCHAR"/> ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PlayPlanNvController.java
@@ -66,16 +66,17 @@ return ResponseUtil.fail("缺少对应用户权限"); } PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); LambdaQueryWrapper<PlayPlanNv> wrapper = new LambdaQueryWrapper<>();// if (AdministratorEnums.CUSTOMER.getCode().equals(SecurityUtils.getAdministratorIdentity())) { wrapper = Wrappers.lambdaQuery(PlayPlanNv.class).eq(PlayPlanNv::getUserId, SecurityUtils.getUserId()); LambdaQueryWrapper<PlayPlanNv> wrapper = Wrappers.lambdaQuery(PlayPlanNv.class); if (SecurityUtils.getClientId() != null) { wrapper = wrapper.eq(PlayPlanNv::getUserId, SecurityUtils.getUserId()).or(w -> { w.eq(PlayPlanNv::getClientId, SecurityUtils.getUserId()); }); } wrapper = Wrappers.lambdaQuery(PlayPlanNv.class); if (StrUtil.isNotBlank(keyword)) { wrapper.like(PlayPlanNv::getName, keyword); if (!keyword.isEmpty()) { wrapper = wrapper.like(PlayPlanNv::getName, keyword); } List<PlayPlanNv> list = playPlanNvService.list(wrapper); //PlayPlanParam param=new PlayPlanParam(); list.forEach(plan -> { plan.setPlan(JSON.parseObject(plan.getSchedule(), Map.class)); }); 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); }