2021与蓝度共同重构项目,服务端
liuhaonan
2022-02-21 e9c3adc815b9e69ce85a050c3833407becb8fe1a
功能完善
已修改3个文件
29 ■■■■■ 文件已修改
dao/src/main/java/com/sandu/ximon/dao/domain/PoleXixunPlayerEntity.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PlayPlanNvController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PlayPlanNvService.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
dao/src/main/java/com/sandu/ximon/dao/domain/PoleXixunPlayerEntity.java
@@ -14,6 +14,7 @@
/**
 * 
 * @TableName pole_xixun_player
 * 熙讯节目实体
 */
@TableName(value ="pole_xixun_player")
@Data
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PlayPlanNvController.java
@@ -35,6 +35,11 @@
        return ResponseUtil.success(playPlanNvService.addPlan(param));
    }
    @GetMapping("/getByPlanId/{planId}")
    public ResponseVO<Object> getPlan(@PathVariable Long planId) {
        return ResponseUtil.success(playPlanNvService.getByPlanId(planId));
    }
    @PostMapping("/update/{planId}")
    public ResponseVO<Object> updateLEDPlan(@PathVariable Long planId,@RequestBody @Validated  PlayPlanParam param) {
        return ResponseUtil.success(playPlanNvService.updatePlan(planId, param));
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PlayPlanNvService.java
@@ -160,4 +160,27 @@
       // return program;
    }
    public Object getByPlanId(Long planId) {
        PlayPlanNv byId = getById(planId);
        if (byId == null) {
            throw new BusinessException("找不到该计划");
        }
        LEDProgram byId1 = ledProgramService.getById(byId.getLedProgramId());
        if (byId1 == null) {
            throw new BusinessException("找不到该节目");
        }
        Map schedule = JSON.parseObject(byId.getSchedule(), Map.class);
        List pages = JSON.parseObject(byId1.getPages(), List.class);
        Map plan=new HashMap();
        plan.put("planId",byId.getId());
        plan.put("planName",byId.getName());
        plan.put("programId",byId1.getId());
        plan.put("programName",byId1.getName());
        plan.put("planVolume",byId.getVolume());
        plan.put("preview",byId1.getPreview());
        plan.put("pages",pages);
        plan.put("schedule",schedule);
        return  plan;
    }
}