| | |
| | | package com.sandu.ximon.admin.service; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.sandu.common.execption.BusinessException; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | | import com.sandu.common.service.impl.BaseServiceImpl; |
| | | import com.sandu.ximon.admin.config.MinIoConstant; |
| | | import com.sandu.ximon.admin.param.IpVolumeMissionParam; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.utils.TaskAPIUtils; |
| | |
| | | // 封装播放文件列表 |
| | | List<TaskMediaFileVO> taskMediaFileVOS = new ArrayList<>(); |
| | | List<BroadcastV2TaskFile> taskFileEntityList = new ArrayList<>(); |
| | | int i = 1; |
| | | int i = 6666; |
| | | for (Integer fileId : new HashSet<>(missionparam.getFileIds())) { |
| | | TaskMediaFileVO taskMediaFileVO = new TaskMediaFileVO(); |
| | | BroadcastV2TaskFile taskFileEntity = new BroadcastV2TaskFile(); |
| | |
| | | taskFileEntity.setFileId(fileId); |
| | | |
| | | IpVolumeFile fileEntity = ipVolumeFileService.getById(fileId); |
| | | String absolutePath = MinIoConstant.getAbsolutePath( |
| | | MinIoConstant.BROADCAST_FILE.getBucketName() + fileEntity.getUserId(), |
| | | fileEntity.getFileName() |
| | | ); |
| | | // String absolutePath = MinIoConstant.getAbsolutePath( |
| | | // MinIoConstant.BROADCAST_FILE.getBucketName() + fileEntity.getUserId(), |
| | | // fileEntity.getFileName() |
| | | // ); |
| | | |
| | | taskMediaFileVO.setI(i); |
| | | i++; |
| | | taskMediaFileVO.setT(0); |
| | | taskMediaFileVO.setN(absolutePath); |
| | | taskMediaFileVO.setN(fileEntity.getFileUrl()); |
| | | taskMediaFileVO.setS(BigInteger.valueOf(fileEntity.getOriginSize())); |
| | | |
| | | taskMediaFileVOS.add(taskMediaFileVO); |
| | |
| | | } |
| | | task.setWeeks("0" + Integer.toBinaryString(byId.getWeek())); |
| | | // byId.setWeeks("0" + Integer.toBinaryString(byId.getWeek())); |
| | | task.setBdate(byId.getOnDate()); |
| | | task.setEdate(byId.getOffDate()); |
| | | |
| | | List<BroadcastV2TaskFile> taskFiles = broadcastV2TaskFileService.list(Wrappers.lambdaQuery(BroadcastV2TaskFile.class) |
| | | .eq(BroadcastV2TaskFile::getTaskId, taskId)); |
| | |
| | | ); |
| | | } |
| | | |
| | | // Map map=new HashMap(); |
| | | // map.put("本地",byId); |
| | | // map.put("服务器",task); |
| | | |
| | | System.out.println(JSON.toJSONString(task)); |
| | | System.out.println(task); |
| | | return task; |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | public boolean stopTask(Integer taskId) { |
| | | return TaskAPIUtils.stopTask(taskId); |
| | | } |
| | | } |