2021与蓝度共同重构项目,服务端
zhanzhiqin
2022-04-25 35b68d05c92ae1eab2e409529a070a217ba492ae
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());
@@ -81,11 +81,12 @@
        poleXixunPlayer.setScreenShot(programPro.getScreenShot());
        //  poleXixunPlayer.setCreatTime(sdf.format(date));
        poleXixunPlayer.setCreateUserId(SecurityUtils.getUserId());
        if (!clientService.findClientId()) {
            poleXixunPlayer.setClientId(clientService.getClientId());
        if (SecurityUtils.getClientId() != null) {
            poleXixunPlayer.setCreateUserId(SecurityUtils.getUserId());
            if (clientService.findClientId()) {
                poleXixunPlayer.setClientId(clientService.getClientId());
            }
        }
        return this.save(poleXixunPlayer);
    }
@@ -127,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;
//    }
    /**
     * 推送节目
     *