Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit. On branch develop Your branch is up to date with 'goflyapp/develop'. Changes to be committed: modified: zlt-business/order-center/src/main/java/com/central/order/config/AliyunImsConfig.java modified: zlt-business/order-center/src/main/java/com/central/order/controller/AutoCutVideoController.java modified: zlt-business/order-center/src/main/java/com/central/order/feign/DeviceCenterService.java new file: zlt-business/order-center/src/main/java/com/central/order/model/params/EditTaskQueryParams.java modified: zlt-business/order-center/src/main/java/com/central/order/service/IEditTaskService.java modified: zlt-business/order-center/src/main/java/com/central/order/service/impl/EditTaskServiceImpl.java modified: zlt-business/order-center/src/main/java/com/central/order/service/impl/MediaServiceImpl.java modified: zlt-business/order-center/src/main/resources/application.yml modified: zlt-business/order-center/src/main/resources/bootstrap.yml modified: zlt-config/src/main/resources/bootstrap.properties modified: zlt-web/react-web/src/main/frontend/config/proxy.ts modified: zlt-web/react-web/src/main/frontend/config/routes.ts new file: zlt-web/react-web/src/main/frontend/src/pages/orders/EditTask/components/CreateForm.tsx new file: zlt-web/react-web/src/main/frontend/src/pages/orders/EditTask/components/UpdateForm.tsx new file: zlt-web/react-web/src/main/frontend/src/pages/orders/EditTask/index.tsx modified: zlt-web/react-web/src/main/frontend/src/pages/orders/Qrcode/index.tsx modified: zlt-web/react-web/src/main/frontend/src/pages/orders/Tourism/components/UpdateForm.tsx modified: zlt-web/react-web/src/main/frontend/src/pages/orders/Tourism/index.tsx modified: zlt-web/react-web/src/main/frontend/src/services/orders/api.ts modified: zlt-web/react-web/src/main/frontend/src/services/orders/typings.d.ts
This commit is contained in:
+2
-2
@@ -11,7 +11,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "aliyun.ims")
|
||||
public class AliyunImsConfig {
|
||||
private String endpoint;
|
||||
private String endpoint = "ice.cn-beijing.aliyuncs.com";
|
||||
private String accessKeyId;
|
||||
private String accessKeySecret;
|
||||
private String region;
|
||||
@@ -29,4 +29,4 @@ public class AliyunImsConfig {
|
||||
.setEndpoint(endpoint);
|
||||
return new Client(config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+56
@@ -1,11 +1,13 @@
|
||||
package com.central.order.controller;
|
||||
|
||||
import com.central.common.model.PageResult;
|
||||
import com.central.common.model.Result;
|
||||
import com.central.order.constants.EditTaskStatus;
|
||||
import com.central.order.enums.OrderStatus;
|
||||
import com.central.order.feign.FileCenterService;
|
||||
import com.central.order.model.*;
|
||||
import com.central.order.model.dto.CallbackDTO;
|
||||
import com.central.order.model.params.EditTaskQueryParams;
|
||||
import com.central.order.service.*;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -246,4 +248,58 @@ public class AutoCutVideoController {
|
||||
private void notifyUser(String userId, String message) {
|
||||
// Implementation of notifyUser method
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "获取剪辑任务列表")
|
||||
@GetMapping("/list")
|
||||
public Result<PageResult<EditTask>> getTaskList(
|
||||
@RequestParam(defaultValue = "1") Integer page,
|
||||
@RequestParam(defaultValue = "10") Integer limit,
|
||||
@RequestParam(required = false) String orderSn,
|
||||
@RequestParam(required = false) String jobId,
|
||||
@RequestParam(required = false) Integer status) {
|
||||
try {
|
||||
EditTaskQueryParams params = EditTaskQueryParams.builder()
|
||||
.page(page)
|
||||
.limit(limit)
|
||||
.orderSn(orderSn)
|
||||
.jobId(jobId)
|
||||
.status(status)
|
||||
.build();
|
||||
|
||||
PageResult<EditTask> result = editTaskService.getTaskList(params);
|
||||
return Result.succeed(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("查询剪辑任务列表失败", e);
|
||||
return Result.failed("查询任务列表失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Operation(summary = "保存或更新剪辑任务")
|
||||
@PostMapping("/save")
|
||||
public Result<Boolean> saveOrUpdateTask(@RequestBody EditTask task) {
|
||||
try {
|
||||
boolean success = editTaskService.saveOrUpdateTask(task);
|
||||
return Result.succeed(success);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("保存剪辑任务失败: task={}", task, e);
|
||||
return Result.failed("保存任务失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Operation(summary = "删除剪辑任务")
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public Result<Boolean> deleteTask(@PathVariable Integer id) {
|
||||
try {
|
||||
boolean success = editTaskService.deleteTask(id);
|
||||
return Result.succeed(success);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("删除剪辑任务失败: id={}", id, e);
|
||||
return Result.failed("删除任务失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,5 +25,5 @@ public interface DeviceCenterService {
|
||||
*/
|
||||
@GetMapping("/wayline/sign/{id}")
|
||||
String getLineFileSign(@PathVariable("id") String id);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.central.order.model.params;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EditTaskQueryParams {
|
||||
private Integer page = 1;
|
||||
private Integer limit = 10;
|
||||
private String orderSn;
|
||||
private String jobId;
|
||||
private Integer status;
|
||||
}
|
||||
+17
@@ -1,7 +1,9 @@
|
||||
package com.central.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.central.common.model.PageResult;
|
||||
import com.central.order.model.EditTask;
|
||||
import com.central.order.model.params.EditTaskQueryParams;
|
||||
|
||||
/**
|
||||
* 视频编辑任务服务接口
|
||||
@@ -41,4 +43,19 @@ public interface IEditTaskService extends IService<EditTask> {
|
||||
* @return 任务实体
|
||||
*/
|
||||
EditTask getTaskByOrderSn(String orderSn);
|
||||
|
||||
/**
|
||||
* 分页查询剪辑任务
|
||||
*/
|
||||
PageResult<EditTask> getTaskList(EditTaskQueryParams params);
|
||||
|
||||
/**
|
||||
* 保存或更新剪辑任务
|
||||
*/
|
||||
boolean saveOrUpdateTask(EditTask task);
|
||||
|
||||
/**
|
||||
* 删除剪辑任务
|
||||
*/
|
||||
boolean deleteTask(Integer id);
|
||||
}
|
||||
|
||||
+95
@@ -2,14 +2,20 @@ package com.central.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.central.common.exception.BusinessException;
|
||||
import com.central.common.model.PageResult;
|
||||
import com.central.order.constants.EditTaskStatus;
|
||||
import com.central.order.mapper.EditTaskMapper;
|
||||
import com.central.order.model.EditTask;
|
||||
import com.central.order.model.params.EditTaskQueryParams;
|
||||
import com.central.order.service.IEditTaskService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@@ -18,6 +24,7 @@ import java.util.Date;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class EditTaskServiceImpl extends ServiceImpl<EditTaskMapper, EditTask> implements IEditTaskService {
|
||||
|
||||
@Override
|
||||
@@ -81,4 +88,92 @@ public class EditTaskServiceImpl extends ServiceImpl<EditTaskMapper, EditTask> i
|
||||
throw new BusinessException("查询订单任务失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<EditTask> getTaskList(EditTaskQueryParams params) {
|
||||
try {
|
||||
// 构建查询条件
|
||||
LambdaQueryWrapper<EditTask> wrapper = new LambdaQueryWrapper<EditTask>()
|
||||
.eq(StringUtils.hasText(params.getOrderSn()), EditTask::getOrderSn, params.getOrderSn())
|
||||
.eq(StringUtils.hasText(params.getJobId()), EditTask::getJobId, params.getJobId())
|
||||
.eq(params.getStatus() != null, EditTask::getStatus, params.getStatus())
|
||||
.orderByDesc(EditTask::getId);
|
||||
|
||||
// 执行分页查询
|
||||
Page<EditTask> page = new Page<>(params.getPage(), params.getLimit());
|
||||
Page<EditTask> resultPage = page(page, wrapper);
|
||||
|
||||
// 转换为PageResult
|
||||
return PageResult.<EditTask>builder()
|
||||
.data(resultPage.getRecords())
|
||||
.resp_code(0)
|
||||
.count(resultPage.getTotal())
|
||||
.build();
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("查询剪辑任务列表失败", e);
|
||||
throw new BusinessException("查询任务列表失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean saveOrUpdateTask(EditTask task) {
|
||||
try {
|
||||
// 参数验证
|
||||
validateTask(task);
|
||||
|
||||
// 如果是新增任务
|
||||
if (task.getId() == null) {
|
||||
task.setCreateTime(new Date());
|
||||
task.setStatus(EditTaskStatus.PENDING);
|
||||
}
|
||||
|
||||
// 更新任务
|
||||
task.setUpdateTime(new Date());
|
||||
return saveOrUpdate(task);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("保存剪辑任务失败: task={}", task, e);
|
||||
throw new BusinessException("保存任务失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean deleteTask(Integer id) {
|
||||
try {
|
||||
// 查询任务
|
||||
EditTask task = getById(id);
|
||||
if (task == null) {
|
||||
throw new BusinessException("任务不存在");
|
||||
}
|
||||
|
||||
// 检查任务状态
|
||||
if (EditTaskStatus.isProcessing(task.getStatus())) {
|
||||
throw new BusinessException("任务处理中,不能删除");
|
||||
}
|
||||
|
||||
return removeById(id);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("删除剪辑任务失败: id={}", id, e);
|
||||
throw new BusinessException("删除任务失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证任务参数
|
||||
*/
|
||||
private void validateTask(EditTask task) {
|
||||
if (task == null) {
|
||||
throw new BusinessException("任务参数不能为空");
|
||||
}
|
||||
if (!StringUtils.hasText(task.getOrderSn())) {
|
||||
throw new BusinessException("订单编号不能为空");
|
||||
}
|
||||
if (task.getUserId() == null) {
|
||||
throw new BusinessException("用户ID不能为空");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+121
-58
@@ -1,7 +1,11 @@
|
||||
package com.central.order.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.aliyun.ice20201109.Client;
|
||||
import com.aliyun.ice20201109.models.*;
|
||||
import com.aliyun.ice20201109.models.GetMediaProducingJobRequest;
|
||||
import com.aliyun.ice20201109.models.GetMediaProducingJobResponse;
|
||||
import com.aliyun.ice20201109.models.SubmitMediaProducingJobRequest;
|
||||
import com.aliyun.ice20201109.models.SubmitMediaProducingJobResponse;
|
||||
import com.central.common.exception.BusinessException;
|
||||
import com.central.order.config.AliyunImsConfig;
|
||||
import com.central.order.model.OrderFile;
|
||||
@@ -12,7 +16,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@@ -25,30 +31,39 @@ public class MediaServiceImpl implements IMediaService {
|
||||
@Override
|
||||
public String submitEditTask(String orderNo, List<OrderFile> orderFiles, List<TourismFile> tourismFiles) {
|
||||
try {
|
||||
// 1. 构建媒体资源列表
|
||||
List<String> mediaAssets = buildMediaAssets(orderFiles, tourismFiles);
|
||||
// 1. 构建时间线配置
|
||||
String timeline = buildTimeline(orderFiles, tourismFiles);
|
||||
|
||||
// 2. 构建输出配置
|
||||
String outputConfig = buildOutputConfig(orderNo);
|
||||
|
||||
// 3. 构建请求
|
||||
SubmitBatchMediaProducingJobRequest request = new SubmitBatchMediaProducingJobRequest()
|
||||
.setProject(imsConfig.getProjectName())
|
||||
.setPipelineName(imsConfig.getPipelineName())
|
||||
.setTemplateId(imsConfig.getTemplateId())
|
||||
.setInputMediaAssets(mediaAssets)
|
||||
.setOutputConfig(outputConfig)
|
||||
.setCallbackUrl(imsConfig.getCallbackUrl());
|
||||
// 3. 构建项目元数据
|
||||
String projectMetadata = buildProjectMetadata(orderNo);
|
||||
|
||||
// 4. 构建userData
|
||||
String userData = buildUserData(orderNo);
|
||||
|
||||
// 打印请求参数,方便调试
|
||||
log.info("提交任务参数: timeline={}, outputConfig={}, projectMetadata={}, userData={}",
|
||||
timeline, outputConfig, projectMetadata, userData);
|
||||
|
||||
// 5. 构建请求
|
||||
SubmitMediaProducingJobRequest request = new SubmitMediaProducingJobRequest()
|
||||
.setTimeline(timeline)
|
||||
.setOutputMediaConfig(outputConfig)
|
||||
.setProjectMetadata(projectMetadata)
|
||||
.setUserData(userData);
|
||||
|
||||
// 6. 提交任务
|
||||
SubmitMediaProducingJobResponse response = imsClient.submitMediaProducingJob(request);
|
||||
|
||||
// 4. 提交任务
|
||||
SubmitBatchMediaProducingJobResponse response = imsClient.submitBatchMediaProducingJob(request);
|
||||
|
||||
if (response != null && response.getStatusCode() == 200) {
|
||||
String jobId = response.getBody().getJobId();
|
||||
log.info("提交智能一键成片任务成功: orderNo={}, jobId={}", orderNo, jobId);
|
||||
log.info("提交智能一键成片任务成功: orderNo={}, jobId={}, projectId={}",
|
||||
orderNo, jobId, response.getBody().getProjectId());
|
||||
return jobId;
|
||||
} else {
|
||||
throw new BusinessException("提交任务失败: " + (response != null ? response.getBody().getMessage() : "未知错误"));
|
||||
throw new BusinessException("提交任务失败: " + (response != null ? response.getBody().getRequestId() : "未知错误"));
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
@@ -60,14 +75,14 @@ public class MediaServiceImpl implements IMediaService {
|
||||
@Override
|
||||
public String getTaskStatus(String jobId) {
|
||||
try {
|
||||
GetBatchMediaProducingJobRequest request = new GetBatchMediaProducingJobRequest()
|
||||
.setJobId(jobId)
|
||||
.setProject(imsConfig.getProjectName());
|
||||
GetMediaProducingJobRequest request = new GetMediaProducingJobRequest()
|
||||
.setJobId(jobId);
|
||||
|
||||
GetBatchMediaProducingJobResponse response = imsClient.getBatchMediaProducingJob(request);
|
||||
|
||||
if (response != null && response.getBody() != null) {
|
||||
return response.getBody().getStatus();
|
||||
GetMediaProducingJobResponse response = imsClient.getMediaProducingJob(request);
|
||||
|
||||
if (response != null && response.getBody() != null
|
||||
&& response.getBody().getMediaProducingJob() != null) {
|
||||
return response.getBody().getMediaProducingJob().getStatus();
|
||||
}
|
||||
return "UNKNOWN";
|
||||
|
||||
@@ -80,14 +95,14 @@ public class MediaServiceImpl implements IMediaService {
|
||||
@Override
|
||||
public String getTaskResult(String jobId) {
|
||||
try {
|
||||
GetBatchMediaProducingJobRequest request = new GetBatchMediaProducingJobRequest()
|
||||
.setJobId(jobId)
|
||||
.setProject(imsConfig.getProjectName());
|
||||
GetMediaProducingJobRequest request = new GetMediaProducingJobRequest()
|
||||
.setJobId(jobId);
|
||||
|
||||
GetBatchMediaProducingJobResponse response = imsClient.getBatchMediaProducingJob(request);
|
||||
|
||||
if (response != null && response.getBody() != null) {
|
||||
return response.getBody().getOutputUrl();
|
||||
GetMediaProducingJobResponse response = imsClient.getMediaProducingJob(request);
|
||||
|
||||
if (response != null && response.getBody() != null
|
||||
&& response.getBody().getMediaProducingJob() != null) {
|
||||
return response.getBody().getMediaProducingJob().getMediaURL();
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -98,54 +113,102 @@ public class MediaServiceImpl implements IMediaService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建媒体资源列表
|
||||
* 构建输出配置
|
||||
* 按照阿里云文档格式:
|
||||
* {
|
||||
* "MediaURL": "oss://bucket-name/output/example.mp4"
|
||||
* }
|
||||
*/
|
||||
private List<String> buildMediaAssets(List<OrderFile> orderFiles, List<TourismFile> tourismFiles) {
|
||||
List<String> assets = new ArrayList<>();
|
||||
private String buildOutputConfig(String orderNo) {
|
||||
Map<String, String> config = new HashMap<>();
|
||||
// 注意:这里只需要设置MediaURL
|
||||
config.put("MediaURL", String.format("oss://%s/output/%s_%s.mp4",
|
||||
imsConfig.getBucket(),
|
||||
orderNo,
|
||||
System.currentTimeMillis()
|
||||
));
|
||||
|
||||
String configJson = JSON.toJSONString(config);
|
||||
log.debug("输出配置: {}", configJson);
|
||||
return configJson;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建时间线配置
|
||||
* 按照阿里云文档格式:
|
||||
* {
|
||||
* "VideoTracks": [{
|
||||
* "VideoTrackClips": [{
|
||||
* "MediaId": "xxxxx"
|
||||
* }]
|
||||
* }]
|
||||
* }
|
||||
*/
|
||||
private String buildTimeline(List<OrderFile> orderFiles, List<TourismFile> tourismFiles) {
|
||||
Map<String, Object> timeline = new HashMap<>();
|
||||
List<Map<String, Object>> videoTracks = new ArrayList<>();
|
||||
Map<String, Object> videoTrack = new HashMap<>();
|
||||
List<Map<String, Object>> videoTrackClips = new ArrayList<>();
|
||||
|
||||
// 处理订单文件
|
||||
if (orderFiles != null) {
|
||||
for (OrderFile file : orderFiles) {
|
||||
assets.add(String.format("{\"type\":\"%s\",\"url\":\"oss://%s/%s\"}",
|
||||
getMediaType(file.getFileType()),
|
||||
imsConfig.getBucket(),
|
||||
file.getFilePath()
|
||||
));
|
||||
Map<String, Object> clip = new HashMap<>();
|
||||
clip.put("MediaId", getMediaId(file.getFilePath()));
|
||||
videoTrackClips.add(clip);
|
||||
}
|
||||
}
|
||||
|
||||
// 处理景区文件
|
||||
if (tourismFiles != null) {
|
||||
for (TourismFile file : tourismFiles) {
|
||||
assets.add(String.format("{\"type\":\"image\",\"url\":\"oss://%s/%s\"}",
|
||||
imsConfig.getBucket(),
|
||||
file.getImageUrl()
|
||||
));
|
||||
Map<String, Object> clip = new HashMap<>();
|
||||
clip.put("MediaId", getMediaId(file.getImageUrl()));
|
||||
videoTrackClips.add(clip);
|
||||
}
|
||||
}
|
||||
|
||||
return assets;
|
||||
videoTrack.put("VideoTrackClips", videoTrackClips);
|
||||
videoTracks.add(videoTrack);
|
||||
timeline.put("VideoTracks", videoTracks);
|
||||
|
||||
String timelineJson = JSON.toJSONString(timeline);
|
||||
log.debug("时间线配置: {}", timelineJson);
|
||||
return timelineJson;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建输出配置
|
||||
* 构建项目元数据
|
||||
*/
|
||||
private String buildOutputConfig(String orderNo) {
|
||||
return String.format(
|
||||
"{\"resolution\":\"1080p\",\"bitrate\":\"5000kbps\",\"fileName\":\"%s_%s\"}",
|
||||
orderNo,
|
||||
System.currentTimeMillis()
|
||||
);
|
||||
private String buildProjectMetadata(String orderNo) {
|
||||
Map<String, String> metadata = new HashMap<>();
|
||||
metadata.put("title", "订单视频_" + orderNo);
|
||||
metadata.put("description", "智能一键成片生成的视频");
|
||||
metadata.put("tags", "订单视频,自动生成");
|
||||
|
||||
String metadataJson = JSON.toJSONString(metadata);
|
||||
log.debug("项目元数据: {}", metadataJson);
|
||||
return metadataJson;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取媒体类型
|
||||
* 构建用户数据
|
||||
*/
|
||||
private String getMediaType(String fileType) {
|
||||
if (fileType == null) return "other";
|
||||
if (fileType.startsWith("video/")) return "video";
|
||||
if (fileType.startsWith("audio/")) return "audio";
|
||||
if (fileType.startsWith("image/")) return "image";
|
||||
return "other";
|
||||
private String buildUserData(String orderNo) {
|
||||
Map<String, String> userData = new HashMap<>();
|
||||
userData.put("orderNo", orderNo);
|
||||
|
||||
String userDataJson = JSON.toJSONString(userData);
|
||||
log.debug("用户数据: {}", userDataJson);
|
||||
return userDataJson;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取媒体ID
|
||||
*/
|
||||
private String getMediaId(String filePath) {
|
||||
// TODO: 这里需要实现获取MediaId的逻辑
|
||||
// 可能需要先将文件上传到阿里云,然后获取MediaId
|
||||
return filePath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,12 +81,12 @@ videos:
|
||||
|
||||
aliyun:
|
||||
ims:
|
||||
endpoint: ice.cn-shanghai.aliyuncs.com
|
||||
access-key-id: ${ALIYUN_ACCESS_KEY_ID}
|
||||
access-key-secret: ${ALIYUN_ACCESS_KEY_SECRET}
|
||||
region: cn-shanghai
|
||||
endpoint: ice.cn-beijing.aliyuncs.com
|
||||
access-key-id: ${zlt.oss.secretId}
|
||||
access-key-secret: ${zlt.oss.secretKey}
|
||||
region: cn-beijing
|
||||
project-name: ${IMS_PROJECT_NAME}
|
||||
pipeline-name: ${IMS_PIPELINE_NAME}
|
||||
template-id: ${IMS_TEMPLATE_ID}
|
||||
callback-url: ${IMS_CALLBACK_URL}
|
||||
bucket: ${OSS_BUCKET_NAME}
|
||||
template-id: ${IMS_TEMPLATE_ID:e26a222d7cfb4a1dae85077efaeb05cd}
|
||||
callback-url: ${IMS_CALLBACK_URL:http://img.goflytec.com/api-order/auto/cut/callback}
|
||||
bucket: ${zlt.oss.bucketName}
|
||||
|
||||
@@ -4,10 +4,10 @@ server:
|
||||
spring:
|
||||
application:
|
||||
name: order-center
|
||||
# cloud:
|
||||
# nacos:
|
||||
# discovery:
|
||||
# ip: 81.70.164.178
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
ip: 81.70.164.178
|
||||
# cloud:
|
||||
# nacos:
|
||||
# discovery:
|
||||
|
||||
Reference in New Issue
Block a user