mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-06 17:36:47 +08:00
参数添加字段
This commit is contained in:
@@ -464,6 +464,7 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
List<CourseContent> cclist = ccontentService.getByCourseId(course.getId());
|
||||
List<String> languageCode = course.getLanguageCode();
|
||||
String code = String.join(",", languageCode);
|
||||
List<BoeaiCourseDto> courseDtos = new ArrayList<>();
|
||||
BoeaiCourseDto boeaiCourseDto = new BoeaiCourseDto();
|
||||
List<BoeaiVideoResourceDto> videoList = new ArrayList<>();
|
||||
boeaiCourseDto = BoeaiCourseDto.builder()
|
||||
@@ -502,12 +503,67 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
}
|
||||
boeaiCourseDto.setBoeaiVideoResourceReqList(videoList);
|
||||
boeaiCourseDto.setVideoCount(videoList.size());
|
||||
|
||||
courseDtos.add(boeaiCourseDto);
|
||||
BoeaiCourseParamsReq paramReq = new BoeaiCourseParamsReq();
|
||||
paramReq.setBoeaiCourseReqList(courseDtos);
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
String message = objectMapper.writeValueAsString(boeaiCourseDto);
|
||||
String message = objectMapper.writeValueAsString(paramReq);
|
||||
String url = "http://10.251.186.27:8088/aiVideo/saveCourse";
|
||||
HttpUtils.sendMessage(message,url);
|
||||
}
|
||||
|
||||
// public static void main(String[] args) throws JsonProcessingException {
|
||||
// // 创建 BoeaiVideoResourceDto 列表
|
||||
// List<BoeaiVideoResourceDto> videoResources = new ArrayList<>();
|
||||
// BoeaiVideoResourceDto videoResource = BoeaiVideoResourceDto.builder()
|
||||
// .id(1L)
|
||||
// .videoId("VID123456")
|
||||
// .courseId("CID123456")
|
||||
// .title("Introduction to Java")
|
||||
// .originalUrl("http://example.com/video.mp4")
|
||||
// .duration(3600)
|
||||
// .fileSize(102400L)
|
||||
// .format("mp4")
|
||||
// .status(2)
|
||||
// .isReviewed(1)
|
||||
// .reviewerId("REV001")
|
||||
// .build();
|
||||
// videoResources.add(videoResource);
|
||||
//
|
||||
// // 创建 BoeaiCourseDto 列表
|
||||
// List<BoeaiCourseDto> courseDtos = new ArrayList<>();
|
||||
// BoeaiCourseDto courseDto = BoeaiCourseDto.builder()
|
||||
// .id(1L)
|
||||
// .courseId("CID123456")
|
||||
// .videoId("VID123456")
|
||||
// .title("Java Programming Course")
|
||||
// .instructor("John Doe")
|
||||
// .chapterCount(10)
|
||||
// .videoCount(20)
|
||||
// .totalDuration(72000)
|
||||
// .description("A comprehensive Java programming course.")
|
||||
// .languageCode("en-US")
|
||||
// .aiSet(1)
|
||||
// .aiAbstract(0)
|
||||
// .aiDraft(0)
|
||||
// .aiTranslate(1)
|
||||
// .languageStatus(1)
|
||||
// .boeaiVideoResourceReqList(videoResources)
|
||||
//
|
||||
// .build();
|
||||
// courseDtos.add(courseDto);
|
||||
//
|
||||
// // 创建 BoeaiCourseParamsReq 并设置 boeaiCourseReqList 属性
|
||||
// BoeaiCourseParamsReq paramReq = new BoeaiCourseParamsReq();
|
||||
// paramReq.setBoeaiCourseReqList(courseDtos);
|
||||
//
|
||||
// ObjectMapper objectMapper = new ObjectMapper();
|
||||
// String message = objectMapper.writeValueAsString(paramReq);
|
||||
//
|
||||
// System.out.println( message);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
/***
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.xboe.module.course.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Huang Run
|
||||
* @date 2025年11月19日
|
||||
*/
|
||||
@Data
|
||||
public class BoeaiCourseParamsReq implements Serializable {
|
||||
List<BoeaiCourseDto> boeaiCourseReqList;
|
||||
}
|
||||
Reference in New Issue
Block a user