mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-06 09:26:48 +08:00
kjb接口添加配置
This commit is contained in:
@@ -23,6 +23,7 @@ import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -67,6 +68,9 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
@Resource
|
||||
private ThirdApi thirdApi;
|
||||
|
||||
@Value("${kjb.aicoreUrl}")
|
||||
private String aicoreUrl;
|
||||
|
||||
|
||||
/**
|
||||
* 教师需要审核的课程
|
||||
@@ -509,7 +513,7 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
paramReq.setBoeaiCourseReqList(courseDtos);
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
String message = objectMapper.writeValueAsString(paramReq);
|
||||
String url = "http://10.251.186.27:8088/aiVideo/saveCourse";
|
||||
String url = aicoreUrl +"/aiVideo/saveCourse";
|
||||
HttpUtils.sendMessage(message,url);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.xboe.school.study.service.IStudyCourseService;
|
||||
import com.xboe.system.organization.service.IOrganizationService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -81,6 +82,9 @@ public class CourseFullTextApi extends ApiBaseController{
|
||||
@Autowired
|
||||
StringRedisTemplate redisTemplate;
|
||||
|
||||
@Value("${kjb.aicoreUrl}")
|
||||
private String aicoreUrl;
|
||||
|
||||
/**
|
||||
* 课程的初始化
|
||||
* @return
|
||||
@@ -424,7 +428,7 @@ public class CourseFullTextApi extends ApiBaseController{
|
||||
String courseId = courseFull.getId();
|
||||
log.info("------------KJB---获取课程摘要信息---------;courseId = " + courseId);
|
||||
//String url = env.getProperty("kjb.url") + "/api/course/getCourseFromKJB?courseId=" + courseId;
|
||||
String url = "http://10.251.186.27:8088/aiVideo/getCourseList";
|
||||
String url = aicoreUrl + "/aiVideo/getCourseList";
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
JSONArray courseIds = new JSONArray();
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.index.reindex.DeleteByQueryRequest;
|
||||
import org.hibernate.mapping.IdGenerator;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
@@ -122,6 +123,9 @@ public class CourseServiceImpl implements ICourseService {
|
||||
@Resource
|
||||
private ModifyLogDao modifyLogDao;
|
||||
|
||||
@Value("${kjb.aicoreUrl}")
|
||||
private String aicoreUrl;
|
||||
|
||||
/**
|
||||
* 生成过滤条件
|
||||
*
|
||||
@@ -471,7 +475,7 @@ public class CourseServiceImpl implements ICourseService {
|
||||
String courseId = course.getId();
|
||||
log.info("------------KJB---获取课程信息---------: courseId = " + courseId);
|
||||
//String url = env.getProperty("kjb.url") + "/api/course/getCourseFromKJB?courseId=" + courseId;
|
||||
String url = "http://10.251.186.27:8088/aiVideo/getCourseList";
|
||||
String url = aicoreUrl + "/aiVideo/getCourseList";
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
JSONArray courseIds = new JSONArray();
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.xboe.school.vo.StudyTimeVo;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -109,6 +110,9 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
@Autowired
|
||||
StringRedisTemplate redisTemplate;
|
||||
|
||||
@Value("${kjb.aicoreUrl}")
|
||||
private String aicoreUrl;
|
||||
|
||||
/**
|
||||
* 用于查询课程的学习记录
|
||||
* @param pager
|
||||
@@ -334,7 +338,7 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
|
||||
public void getVtt(String couirseId, CourseContent cc){
|
||||
log.info("------KJB --------- getVtt couirseId = " + couirseId + " videoId = " + cc.getId());
|
||||
String url = "http://10.251.186.27:8088/aiVideo/getVideoVtt";
|
||||
String url = aicoreUrl + "/aiVideo/getVideoVtt";
|
||||
JSONObject message = new JSONObject();
|
||||
message.put("courseId", couirseId);
|
||||
message.put("videoId", cc.getId());
|
||||
|
||||
@@ -119,6 +119,9 @@ jasypt:
|
||||
boe:
|
||||
domain: http://10.251.186.27
|
||||
|
||||
kjb:
|
||||
aicoreUrl: http://10.251.186.27:8088
|
||||
|
||||
ok:
|
||||
http:
|
||||
connect-timeout: 30
|
||||
|
||||
Reference in New Issue
Block a user