2021与蓝度共同重构项目,服务端
liuhaonan
2022-04-26 d8bd5680f12b212d740ba7b8f5d641e3a327faca
ximon-admin/src/main/java/com/sandu/ximon/admin/service/XiXunPlayerService.java
@@ -45,14 +45,14 @@
    //熙讯节目列表
    public LambdaQueryWrapper<PoleXixunPlayerEntity> XixunPlayerList(String keyword) {
        if (SecurityUtils.getClientId() == null) {
            if (keyword.isEmpty()) {
            if (keyword != null && keyword.isEmpty()) {
                return Wrappers.lambdaQuery(PoleXixunPlayerEntity.class);
            } else {
                return Wrappers.lambdaQuery(PoleXixunPlayerEntity.class).like(PoleXixunPlayerEntity::getProgramName, keyword);
            }
        } else {
            if (keyword.isEmpty()) {
            if (keyword != null && keyword.isEmpty()) {
                return Wrappers.lambdaQuery(PoleXixunPlayerEntity.class).eq(PoleXixunPlayerEntity::getCreateUserId, SecurityUtils.getUserId())
                        .or(w -> {
                            w.eq(PoleXixunPlayerEntity::getClientId, SecurityUtils.getClientId());
@@ -128,6 +128,38 @@
        return programPro;
    }
//    public Object getProgram(String json) {
////        PoleXixunPlayerEntity byId = getById(pid);
//        List<Long> fileIds = new ArrayList<>();
//        List<LedSFile> file = new ArrayList<>();
//        if (json == null) {
//            throw new BusinessException("未找到该节目");
//        }
//        ProgramPro programPro = new ProgramPro();
//        try {
//            programPro = JsonUtil.convertJsonStringToObject(json, ProgramPro.class);
//            programPro.setProgramId(pid);
//            programPro.setScreenShot(byId.getScreenShot());
//            programPro.getLayers().forEach(
//                    layerPro -> {
//                        layerPro.getSources().forEach(
//                                sourcePro -> {
//                                    long fileId = Long.parseLong(sourcePro.getId());
//                                    file.add(xiXunFileService.getById(fileId));
//                                }
//                        );
//                    }
//            );
//            programPro.setFileList(file);
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        return programPro;
//    }
    /**
     * 推送节目
     *
@@ -191,4 +223,10 @@
    }
    /**
     * 推送大气数据到熙讯LED
     */
}