mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
参数添加字段
This commit is contained in:
@@ -9,6 +9,7 @@ import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.nacos.shaded.com.google.common.util.concurrent.RateLimiter;
|
||||
@@ -16,6 +17,7 @@ import com.boe.feign.api.infrastructure.entity.CommonSearchVo;
|
||||
import com.boe.feign.api.infrastructure.entity.Dict;
|
||||
import com.xboe.api.ThirdApi;
|
||||
import com.xboe.constants.CacheName;
|
||||
import com.xboe.module.course.dto.AiVideoResourceRsp;
|
||||
import com.xboe.module.course.dto.BoeaiSubtitleRsp;
|
||||
import com.xboe.module.course.utils.HttpUtils;
|
||||
import com.xboe.module.course.vo.TeacherVo;
|
||||
@@ -343,18 +345,19 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
}
|
||||
//将返回string 转为json对象
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
JSONArray rows = jsonObject.getJSONArray("data");
|
||||
//将json数组转为list对象
|
||||
|
||||
List<BoeaiSubtitleRsp> boeaiSubtitleRspList = new ArrayList<>();
|
||||
String data = jsonObject.getString("data");
|
||||
//json字符串转为实体对象
|
||||
AiVideoResourceRsp aiVideoResourceRsp = JSON.parseObject(data, AiVideoResourceRsp.class);
|
||||
log.info("aiVideoResourceRsp:"+aiVideoResourceRsp);
|
||||
//循环json对象
|
||||
if(rows != null && !rows.isEmpty()){
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
JSONObject row = rows.getJSONObject(i);
|
||||
//将json对象转为实体对象 CourseContentVtt
|
||||
BoeaiSubtitleRsp vtt = row.toJavaObject(BoeaiSubtitleRsp.class);
|
||||
boeaiSubtitleRspList.add(vtt);
|
||||
}
|
||||
if(aiVideoResourceRsp != null){
|
||||
cc.setBoeaiSubtitleRspList(aiVideoResourceRsp.getBoeaiSubtitleRspList());
|
||||
// for (int i = 0; i < rows.size(); i++) {
|
||||
// JSONObject row = rows.getJSONObject(i);
|
||||
// //将json对象转为实体对象 CourseContentVtt
|
||||
// BoeaiSubtitleRsp vtt = row.toJavaObject(BoeaiSubtitleRsp.class);
|
||||
// boeaiSubtitleRspList.add(vtt);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user