mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-12 04:16:51 +08:00
Compare commits
1 Commits
player-202
...
250331-bug
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cdf9698f71 |
@@ -239,10 +239,6 @@
|
|||||||
<artifactId>xxl-job-core</artifactId>
|
<artifactId>xxl-job-core</artifactId>
|
||||||
<version>2.3.0</version> <!-- 请根据实际需求选择版本 -->
|
<version>2.3.0</version> <!-- 请根据实际需求选择版本 -->
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
|
||||||
<artifactId>httpclient</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -45,7 +45,10 @@ import javax.annotation.Resource;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.concurrent.ForkJoinPool;
|
import java.util.concurrent.ForkJoinPool;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
@@ -95,8 +98,7 @@ public class ThirdApi {
|
|||||||
private String syncOnLineScore;
|
private String syncOnLineScore;
|
||||||
@Value("${coursesuilt.updateOnLineStatua}")
|
@Value("${coursesuilt.updateOnLineStatua}")
|
||||||
private String updateOnLineStatua;
|
private String updateOnLineStatua;
|
||||||
@Value("${coursesuilt.delOnLineById}")
|
|
||||||
private String delOnLineById;
|
|
||||||
|
|
||||||
//获取例外人员的id
|
//获取例外人员的id
|
||||||
public List<String> getUserId() {
|
public List<String> getUserId() {
|
||||||
@@ -396,28 +398,4 @@ public class ThirdApi {
|
|||||||
public void syncExamStudyRecord(ExamStudyRecordParam param) {
|
public void syncExamStudyRecord(ExamStudyRecordParam param) {
|
||||||
externalRemoteClient.syncExamStudyRecord(param);
|
externalRemoteClient.syncExamStudyRecord(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void delOnLineById(CourseParam param, String token) {
|
|
||||||
log.info("---------------同步在线课删除 ------- param " + param);
|
|
||||||
String resp = Optional.ofNullable(
|
|
||||||
HttpRequest.post(delOnLineById).body(JSONUtil.toJsonStr(param)).header("token", token).execute()
|
|
||||||
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
|
||||||
log.info("-------delOnLineById = " + resp);
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取字典信息
|
|
||||||
public List<Dict> getDictItems(CommonSearchVo searcher) {
|
|
||||||
try {
|
|
||||||
List<Dict> dictList = dictRemoteClient.getList(searcher);
|
|
||||||
if(!Objects.isNull(dictList) && dictList.size() > 0){
|
|
||||||
// List<String> dicts = dictList.stream().map(Dict::getValue).collect(Collectors.toList());
|
|
||||||
return dictList;
|
|
||||||
}else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("-------获取字典信息 = " + e.getMessage());
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.xboe.module.course.api;
|
package com.xboe.module.course.api;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -8,23 +7,9 @@ import java.util.List;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import com.xboe.api.ThirdApi;
|
import com.xboe.api.ThirdApi;
|
||||||
import com.xboe.module.course.dto.*;
|
import com.xboe.module.course.dto.CourseParam;
|
||||||
import com.xboe.module.course.entity.*;
|
|
||||||
import com.xboe.module.course.utils.HttpUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.http.client.HttpClient;
|
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
||||||
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.util.CollectionUtils;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@@ -36,6 +21,13 @@ import com.xboe.core.CurrentUser;
|
|||||||
import com.xboe.core.JsonResponse;
|
import com.xboe.core.JsonResponse;
|
||||||
import com.xboe.core.api.ApiBaseController;
|
import com.xboe.core.api.ApiBaseController;
|
||||||
import com.xboe.core.log.AutoLog;
|
import com.xboe.core.log.AutoLog;
|
||||||
|
import com.xboe.module.course.dto.CourseFullDto;
|
||||||
|
import com.xboe.module.course.dto.CourseHRBPAuditDto;
|
||||||
|
import com.xboe.module.course.dto.CourseQueryDto;
|
||||||
|
import com.xboe.module.course.entity.Course;
|
||||||
|
import com.xboe.module.course.entity.CourseAudit;
|
||||||
|
import com.xboe.module.course.entity.CourseContent;
|
||||||
|
import com.xboe.module.course.entity.CourseHRBPAudit;
|
||||||
import com.xboe.module.course.service.ICourseAuditService;
|
import com.xboe.module.course.service.ICourseAuditService;
|
||||||
import com.xboe.module.course.service.ICourseContentService;
|
import com.xboe.module.course.service.ICourseContentService;
|
||||||
import com.xboe.module.course.service.ICourseHRBPAuditService;
|
import com.xboe.module.course.service.ICourseHRBPAuditService;
|
||||||
@@ -69,11 +61,6 @@ public class CourseAuditApi extends ApiBaseController{
|
|||||||
@Resource
|
@Resource
|
||||||
private ThirdApi thirdApi;
|
private ThirdApi thirdApi;
|
||||||
|
|
||||||
@Value("${kjb.aicoreUrl}")
|
|
||||||
private String aicoreUrl;
|
|
||||||
@Value("${kjb.videoUrlPrefix}")
|
|
||||||
private String videoUrlPerfix;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 教师需要审核的课程
|
* 教师需要审核的课程
|
||||||
@@ -371,10 +358,8 @@ public class CourseAuditApi extends ApiBaseController{
|
|||||||
//修改在线课开课状态=已开课
|
//修改在线课开课状态=已开课
|
||||||
String token = request.getHeader("Xboe-Access-Token");
|
String token = request.getHeader("Xboe-Access-Token");
|
||||||
CourseParam param = new CourseParam();
|
CourseParam param = new CourseParam();
|
||||||
param.setId(c.getId());
|
param.setId(courseId);
|
||||||
param.setOrgId(c.getOrgId());
|
thirdApi.updateOnLineStatua(param,token);
|
||||||
param.setOrgName(c.getOrgName());
|
|
||||||
thirdApi.updateOrSaveCourse(param,token);
|
|
||||||
}
|
}
|
||||||
return success(true);
|
return success(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -448,10 +433,6 @@ public class CourseAuditApi extends ApiBaseController{
|
|||||||
param.setOrgName(dto.getCourse().getOrgName());
|
param.setOrgName(dto.getCourse().getOrgName());
|
||||||
thirdApi.updateOrSaveCourse(param,token);
|
thirdApi.updateOrSaveCourse(param,token);
|
||||||
log.info("---------------在线课同步到讲师管理完毕 -------");
|
log.info("---------------在线课同步到讲师管理完毕 -------");
|
||||||
//AI视频处理-调用接口
|
|
||||||
//需求调整-课程AI设置放在课程提交审核之前
|
|
||||||
this.sendMessageToKJB(dto);
|
|
||||||
log.info("---------------**审核**AI视频处理-调用接口完毕 -------");
|
|
||||||
return success(true);
|
return success(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("默认管理员提交直接发布处理失败",e);
|
log.error("默认管理员提交直接发布处理失败",e);
|
||||||
@@ -460,70 +441,6 @@ public class CourseAuditApi extends ApiBaseController{
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void sendMessageToKJB(CourseFullDto dto) throws JsonProcessingException {
|
|
||||||
Course course = dto.getCourse();
|
|
||||||
//log.info("---------------AI视频处理-调用接口 -------");
|
|
||||||
log.info("aiSet:"+course.getAiSet()+",aiAbstract:"+course.getAiAbstract()+",aiDraft:"+course.getAiDraft()+",aiTranslate:"+course.getAiTranslate()+",languageCode:"+course.getLanguageCode());
|
|
||||||
List<CourseTeacher> teachers = dto.getTeachers();
|
|
||||||
StringBuilder teacherNames = new StringBuilder();
|
|
||||||
if(!CollectionUtils.isEmpty(teachers)){
|
|
||||||
for (CourseTeacher teacher : teachers) {
|
|
||||||
teacherNames.append(teacher.getTeacherName()).append(",");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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()
|
|
||||||
.courseId(course.getId())
|
|
||||||
.title(course.getName())
|
|
||||||
.description(course.getSummary())
|
|
||||||
.instructor(teacherNames.toString())
|
|
||||||
.chapterCount(1) //章节数
|
|
||||||
.languageCode(code) //语言
|
|
||||||
.aiTranslate(course.getAiTranslate())
|
|
||||||
.aiAbstract(course.getAiAbstract())
|
|
||||||
.aiDraft(course.getAiDraft())
|
|
||||||
.aiSet(course.getAiSet())
|
|
||||||
.languageStatus(course.getLanguageStatus())
|
|
||||||
.build() ;
|
|
||||||
if(cclist != null && !cclist.isEmpty()){
|
|
||||||
for (CourseContent cc : cclist) {
|
|
||||||
//筛选视频资源
|
|
||||||
if(cc.getContentType() == 10 ){
|
|
||||||
JSONObject json = JSONObject.parseObject(cc.getContent());
|
|
||||||
if(json == null || json.getString("url") == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
String videoUrl = json.getString("url");
|
|
||||||
//String videoUrlPerfix = "https://u-pre.boe.com/upload"; //测试
|
|
||||||
//String videoUrlPerfix = "https://u.boe.com/upload"; //生产
|
|
||||||
String videoType = videoUrl.substring(videoUrl.lastIndexOf(".")+1);
|
|
||||||
videoList.add(BoeaiVideoResourceDto.builder()
|
|
||||||
.courseId(cc.getCourseId())
|
|
||||||
.videoId(cc.getId())
|
|
||||||
.title(cc.getContentName())
|
|
||||||
.originalUrl(videoUrlPerfix+videoUrl)
|
|
||||||
.duration(cc.getDuration())
|
|
||||||
.format(videoType)
|
|
||||||
.build());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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(paramReq);
|
|
||||||
String url = aicoreUrl +"/aiVideo/saveCourse";
|
|
||||||
HttpUtils.sendMessage(message,url);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@@ -556,4 +473,5 @@ public class CourseAuditApi extends ApiBaseController{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ import javax.annotation.Resource;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import it.sauronsoftware.jave.Encoder;
|
|
||||||
import it.sauronsoftware.jave.MultimediaInfo;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.orm.ObjectOptimisticLockingFailureException;
|
import org.springframework.orm.ObjectOptimisticLockingFailureException;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@@ -48,6 +46,8 @@ import com.xboe.module.scorm.SCORMParser;
|
|||||||
import com.xboe.standard.BaseConstant;
|
import com.xboe.standard.BaseConstant;
|
||||||
import com.xboe.standard.enums.BoedxCourseFileType;
|
import com.xboe.standard.enums.BoedxCourseFileType;
|
||||||
|
|
||||||
|
import it.sauronsoftware.jave.Encoder;
|
||||||
|
import it.sauronsoftware.jave.MultimediaInfo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -278,8 +278,8 @@ public class CourseFileApi extends ApiBaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("读取视频时长错误", e);
|
log.error("读取视频时长错误");
|
||||||
return error("视频解析失败,尝试重新上传或联系管理员", "视频解析失败,尝试重新上传或联系管理员");
|
// e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,23 +7,17 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.lang.Opt;
|
import cn.hutool.core.lang.Opt;
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.boe.feign.api.serverall.entity.UserData;
|
import com.boe.feign.api.serverall.entity.UserData;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.xboe.api.ThirdApi;
|
import com.xboe.api.ThirdApi;
|
||||||
import com.xboe.data.outside.IOutSideDataService;
|
import com.xboe.data.outside.IOutSideDataService;
|
||||||
import com.xboe.module.course.dto.BoeaiCourseDto;
|
|
||||||
import com.xboe.module.course.utils.HttpUtils;
|
|
||||||
import com.xboe.module.course.vo.TeacherVo;
|
import com.xboe.module.course.vo.TeacherVo;
|
||||||
import com.xboe.school.study.entity.StudyCourse;
|
import com.xboe.school.study.entity.StudyCourse;
|
||||||
import com.xboe.school.study.service.IStudyCourseService;
|
import com.xboe.school.study.service.IStudyCourseService;
|
||||||
import com.xboe.system.organization.service.IOrganizationService;
|
import com.xboe.system.organization.service.IOrganizationService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -50,7 +44,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
//课程AI设置
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value="/xboe/m/course/fulltext")
|
@RequestMapping(value="/xboe/m/course/fulltext")
|
||||||
@@ -82,9 +76,6 @@ public class CourseFullTextApi extends ApiBaseController{
|
|||||||
@Autowired
|
@Autowired
|
||||||
StringRedisTemplate redisTemplate;
|
StringRedisTemplate redisTemplate;
|
||||||
|
|
||||||
@Value("${kjb.aicoreUrl}")
|
|
||||||
private String aicoreUrl;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程的初始化
|
* 课程的初始化
|
||||||
* @return
|
* @return
|
||||||
@@ -331,8 +322,6 @@ public class CourseFullTextApi extends ApiBaseController{
|
|||||||
if(c.getSource()==2) {
|
if(c.getSource()==2) {
|
||||||
cids.add(c.getId());
|
cids.add(c.getId());
|
||||||
}
|
}
|
||||||
log.info("---- KJB 开始获取课程摘要信息 ---");
|
|
||||||
this.getCourseFromKJB(c,new Course());
|
|
||||||
}
|
}
|
||||||
List<Course> clist=null;
|
List<Course> clist=null;
|
||||||
if(!cids.isEmpty()) {
|
if(!cids.isEmpty()) {
|
||||||
@@ -424,48 +413,6 @@ public class CourseFullTextApi extends ApiBaseController{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getCourseFromKJB(CourseFullText courseFull,Course course){
|
|
||||||
String courseId = courseFull.getId();
|
|
||||||
log.info("------------KJB---获取课程详情 start ---------;courseId = " + courseId);
|
|
||||||
//String url = env.getProperty("kjb.url") + "/api/course/getCourseFromKJB?courseId=" + courseId;
|
|
||||||
String url = aicoreUrl + "/aiVideo/getCourseList";
|
|
||||||
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
|
||||||
JSONArray courseIds = new JSONArray();
|
|
||||||
courseIds.add(courseId);
|
|
||||||
jsonObject.put("courseIds", courseIds);
|
|
||||||
String result = HttpUtils.sendMessage(jsonObject.toJSONString(), url);
|
|
||||||
|
|
||||||
//将返回string 转为json对象
|
|
||||||
log.info("---KJB --摘要接口返回结果result: "+result);
|
|
||||||
JSONObject jsonResult = JSONObject.parseObject(result);
|
|
||||||
String data = jsonResult.getString("rows");
|
|
||||||
//json字符串转为实体对象
|
|
||||||
// 直接解析为 List<Course>
|
|
||||||
List<BoeaiCourseDto> boeaiCourseDto = JSON.parseArray(data, BoeaiCourseDto.class);
|
|
||||||
//List<BoeaiCourseDto> aiVideoResourceRsp = Collections.singletonList(JSON.parseObject(data, BoeaiCourseDto.class));
|
|
||||||
if(boeaiCourseDto != null && !boeaiCourseDto.isEmpty()){
|
|
||||||
//log.info("KJB摘要信息:"+boeaiCourseDto.get(0).getSummaryContent());
|
|
||||||
courseFull.setAiAbstract(boeaiCourseDto.get(0).getAiAbstract());
|
|
||||||
courseFull.setSummaryContent(boeaiCourseDto.get(0).getSummaryContent());
|
|
||||||
courseFull.setAiSet(boeaiCourseDto.get(0).getAiSet());
|
|
||||||
courseFull.setAiDraft(boeaiCourseDto.get(0).getAiDraft());
|
|
||||||
courseFull.setAiTranslate(boeaiCourseDto.get(0).getAiTranslate());
|
|
||||||
courseFull.setLanguageStatus(boeaiCourseDto.get(0).getLanguageStatus());
|
|
||||||
courseFull.setLanguageCode(boeaiCourseDto.get(0).getLanguageCode() == null ? new ArrayList<>() :Arrays.asList(boeaiCourseDto.get(0).getLanguageCode().split(",")));
|
|
||||||
|
|
||||||
course.setAiSet(boeaiCourseDto.get(0).getAiSet());
|
|
||||||
course.setAiAbstract(boeaiCourseDto.get(0).getAiAbstract());
|
|
||||||
//course.setSummaryStatus(boeaiCourseDto.get(0).getSummaryStatus());
|
|
||||||
course.setSummaryContent(boeaiCourseDto.get(0).getSummaryContent());
|
|
||||||
course.setAiDraft(boeaiCourseDto.get(0).getAiDraft());
|
|
||||||
course.setAiTranslate(boeaiCourseDto.get(0).getAiTranslate());
|
|
||||||
course.setLanguageStatus(boeaiCourseDto.get(0).getLanguageStatus());
|
|
||||||
course.setLanguageCode(boeaiCourseDto.get(0).getLanguageCode() == null ? new ArrayList<>() :Arrays.asList(boeaiCourseDto.get(0).getLanguageCode().split(",")));
|
|
||||||
}
|
|
||||||
log.info("------------KJB---获取课程详情 end ---------");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void getTeacherStatusByCode(String token, PageList<CourseFullText> coursePageList) {
|
private void getTeacherStatusByCode(String token, PageList<CourseFullText> coursePageList) {
|
||||||
log.info("获取教师信息通过工号 ");
|
log.info("获取教师信息通过工号 ");
|
||||||
List<String> teacherCoeds = new ArrayList<>();
|
List<String> teacherCoeds = new ArrayList<>();
|
||||||
|
|||||||
@@ -2,19 +2,15 @@
|
|||||||
|
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.boe.feign.api.infrastructure.entity.CommonSearchVo;
|
|
||||||
import com.boe.feign.api.infrastructure.entity.Dict;
|
|
||||||
import com.xboe.api.ThirdApi;
|
import com.xboe.api.ThirdApi;
|
||||||
import com.xboe.module.course.dto.*;
|
import com.xboe.module.course.dto.*;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@@ -103,11 +99,6 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
IDataUserSyncService userSyncService;
|
IDataUserSyncService userSyncService;
|
||||||
@Resource
|
@Resource
|
||||||
private ThirdApi thirdApi;
|
private ThirdApi thirdApi;
|
||||||
@Resource
|
|
||||||
CourseAuditApi courseAuditApi;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
CourseFullTextApi courseFullTextApi;
|
|
||||||
|
|
||||||
// @PostMapping("/test")
|
// @PostMapping("/test")
|
||||||
// public JsonResponse<PageList<Course>> findTest(Pagination pager,CourseQueryDto dto){
|
// public JsonResponse<PageList<Course>> findTest(Pagination pager,CourseQueryDto dto){
|
||||||
@@ -179,53 +170,17 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
List<CourseTeacher> teachers=courseService.findTeachersByCourseId(id);
|
List<CourseTeacher> teachers=courseService.findTeachersByCourseId(id);
|
||||||
List<CourseCrowd> crowds=courseService.findCrowdByCourseId(id);
|
List<CourseCrowd> crowds=courseService.findCrowdByCourseId(id);
|
||||||
|
|
||||||
CommonSearchVo searcher = new CommonSearchVo();
|
//
|
||||||
searcher.setPid(637L);
|
|
||||||
searcher.setType(1);
|
|
||||||
List<Dict> dictList = thirdApi.getDictItems(searcher);
|
|
||||||
boolean isPermission = false;
|
|
||||||
if(dictList != null && dictList.size() > 0){
|
|
||||||
List<String> dicts = dictList.stream().map(Dict::getValue).collect(Collectors.toList());
|
|
||||||
isPermission = dicts.contains(course.getOrgId());
|
|
||||||
rs.put("dicts",dicts);
|
|
||||||
}
|
|
||||||
//void getCourseFromKJB(CourseFullText courseFull,Course course){
|
|
||||||
log.info("-------课程详情(KJB)查询开始-------");
|
|
||||||
CourseFullText courseFull = new CourseFullText();
|
|
||||||
courseFull.setId(course.getId());
|
|
||||||
courseFullTextApi.getCourseFromKJB(courseFull,course);
|
|
||||||
log.info("-------课程详情(KJB)查询结束-------");
|
|
||||||
|
|
||||||
log.error("-------是否仅内网查看 = " + isPermission);
|
|
||||||
rs.put("course",course);
|
rs.put("course",course);
|
||||||
rs.put("contents",cclist);
|
rs.put("contents",cclist);
|
||||||
rs.put("sections",sectionlist);
|
rs.put("sections",sectionlist);
|
||||||
rs.put("teachers",teachers);
|
rs.put("teachers",teachers);
|
||||||
rs.put("crowds",crowds);
|
rs.put("crowds",crowds);
|
||||||
rs.put("isPermission",isPermission);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return success(rs);
|
return success(rs);
|
||||||
|
|
||||||
}
|
}
|
||||||
@GetMapping("/getDictIds")
|
|
||||||
public JsonResponse<Map<String,Object>> getDictIds(Long pid,Integer type){
|
|
||||||
CommonSearchVo searcher = new CommonSearchVo();
|
|
||||||
if(pid==null || type ==null){
|
|
||||||
return badRequest("参数错误");
|
|
||||||
}
|
|
||||||
Map<String,Object> rs=new HashMap<String,Object>();
|
|
||||||
searcher.setPid(pid);
|
|
||||||
searcher.setType(type);
|
|
||||||
List<Dict> dictList = thirdApi.getDictItems(searcher);
|
|
||||||
rs.put("dicts",null);
|
|
||||||
if(dictList != null && dictList.size() > 0){
|
|
||||||
List<String> dicts = dictList.stream().map(Dict::getValue).collect(Collectors.toList());
|
|
||||||
rs.put("dicts",dicts);
|
|
||||||
}
|
|
||||||
return success(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管理员审核列表,教师的审核不在这里,此审核也应该移动CourseAuditApi中去
|
* 管理员审核列表,教师的审核不在这里,此审核也应该移动CourseAuditApi中去
|
||||||
@@ -353,11 +308,6 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
param.setOrgName(dto.getCourse().getOrgName());
|
param.setOrgName(dto.getCourse().getOrgName());
|
||||||
thirdApi.updateOrSaveCourse(param,token);
|
thirdApi.updateOrSaveCourse(param,token);
|
||||||
log.info("---------------在线课同步到讲师管理完毕 -------");
|
log.info("---------------在线课同步到讲师管理完毕 -------");
|
||||||
//AI视频处理-调用接口
|
|
||||||
log.info("---------------AI视频处理-调用接口开始 -------");
|
|
||||||
courseAuditApi.sendMessageToKJB(dto);
|
|
||||||
log.info("---------------AI视频处理-调用接口结束 -------");
|
|
||||||
|
|
||||||
return success(dto);
|
return success(dto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("整体保存课程信息错误",e);
|
log.error("整体保存课程信息错误",e);
|
||||||
@@ -402,28 +352,6 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/benchAiSet")
|
|
||||||
@AutoLog(module = "课程",action = "批量课程AI设置",info = "")
|
|
||||||
public JsonResponse<CourseFullDto> benchAiSet(@RequestBody CourseFullDto dto){
|
|
||||||
log.info("--------------- 批量课程AI设置 ----------");
|
|
||||||
if(CollectionUtils.isEmpty(dto.getCourseList())) {
|
|
||||||
return badRequest("请选择要设置的课程");
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
CourseFullDto item;
|
|
||||||
for (Course course : dto.getCourseList()) {
|
|
||||||
item = new CourseFullDto();
|
|
||||||
item.setCourse(course);
|
|
||||||
courseAuditApi.sendMessageToKJB(item);
|
|
||||||
}
|
|
||||||
return success(dto);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("批量课程AI设置错误",e);
|
|
||||||
return error("保存失败",e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private String checkForSubmit(Course c) {
|
private String checkForSubmit(Course c) {
|
||||||
String error=null;
|
String error=null;
|
||||||
if(StringUtils.isBlank(c.getName())) {
|
if(StringUtils.isBlank(c.getName())) {
|
||||||
@@ -958,7 +886,7 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public JsonResponse<Boolean> delete(String id,Boolean erasable,String title,String remark, HttpServletRequest request){
|
public JsonResponse<Boolean> delete(String id,Boolean erasable,String title,String remark){
|
||||||
if(StringUtils.isBlank(id)){
|
if(StringUtils.isBlank(id)){
|
||||||
return badRequest("参数错误");
|
return badRequest("参数错误");
|
||||||
}
|
}
|
||||||
@@ -973,11 +901,6 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
try {
|
try {
|
||||||
CurrentUser cu=getCurrent();
|
CurrentUser cu=getCurrent();
|
||||||
courseService.delete(id, erasable,cu.getAccountId(), cu.getName(), remark);
|
courseService.delete(id, erasable,cu.getAccountId(), cu.getName(), remark);
|
||||||
|
|
||||||
String token = request.getHeader("Xboe-Access-Token");
|
|
||||||
CourseParam param = new CourseParam();
|
|
||||||
param.setId(id);
|
|
||||||
thirdApi.delOnLineById(param,token);
|
|
||||||
return success(true);
|
return success(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("管理员删除课程错误",e);
|
log.error("管理员删除课程错误",e);
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
package com.xboe.module.course.dao;
|
|
||||||
|
|
||||||
import com.xboe.core.orm.BaseDao;
|
|
||||||
import com.xboe.module.course.entity.CourseTeacherDeletedRecord;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
@Repository
|
|
||||||
public class CourseTeacherDeletedRecordDao extends BaseDao<CourseTeacherDeletedRecord> {
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
package com.xboe.module.course.dao;
|
|
||||||
|
|
||||||
import com.xboe.core.orm.BaseDao;
|
|
||||||
import com.xboe.module.course.entity.ModifyLog;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
@Repository
|
|
||||||
public class ModifyLogDao extends BaseDao<ModifyLog> {
|
|
||||||
|
|
||||||
public void insert(String requestId, String location, String body, String remark) {
|
|
||||||
ModifyLog entity = new ModifyLog();
|
|
||||||
entity.setRequestId(requestId);
|
|
||||||
entity.setLocation(location);
|
|
||||||
entity.setBody(body);
|
|
||||||
entity.setRemark(remark);
|
|
||||||
|
|
||||||
save(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
package com.xboe.module.course.dto;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Huang Run
|
|
||||||
* @date 2025年11月04日
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class AiVideoResourceRsp {
|
|
||||||
//多语言字幕信息
|
|
||||||
List<BoeaiSubtitleRsp> boeaiSubtitleRspList;
|
|
||||||
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视频业务ID
|
|
||||||
*/
|
|
||||||
private String videoId;
|
|
||||||
/**
|
|
||||||
* 视频语言编码 如 zh-CN, en-US
|
|
||||||
*/
|
|
||||||
//private String languageCode;
|
|
||||||
/**
|
|
||||||
* 课程ID
|
|
||||||
*/
|
|
||||||
private String courseId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视频标题
|
|
||||||
*/
|
|
||||||
private String title;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 原始视频URL
|
|
||||||
*/
|
|
||||||
private String originalUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视频时长(秒)
|
|
||||||
*/
|
|
||||||
private Integer duration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件大小(字节)
|
|
||||||
*/
|
|
||||||
private Long fileSize;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视频格式 mp4/avi等
|
|
||||||
*/
|
|
||||||
private String format;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态 0-待处理 1-处理中 2-已完成 3-失败
|
|
||||||
*/
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否已审核 0-否 1-是
|
|
||||||
*/
|
|
||||||
private Integer isReviewed;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 审核人ID
|
|
||||||
*/
|
|
||||||
private String reviewerId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 审核时间
|
|
||||||
*/
|
|
||||||
private Date reviewedAt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private Date createdAt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private Date updatedAt;
|
|
||||||
}
|
|
||||||
@@ -1,103 +0,0 @@
|
|||||||
package com.xboe.module.course.dto;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import javax.persistence.Transient;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author
|
|
||||||
* @date 2025年11月18日
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class BoeaiCourseDto {
|
|
||||||
List<BoeaiVideoResourceDto> boeaiVideoResourceReqList;
|
|
||||||
|
|
||||||
|
|
||||||
List<String> courseVideoIds;
|
|
||||||
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 课程ID
|
|
||||||
*/
|
|
||||||
private String courseId;
|
|
||||||
/**
|
|
||||||
* 视频ID
|
|
||||||
*/
|
|
||||||
private String videoId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 课程标题
|
|
||||||
*/
|
|
||||||
private String title;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 讲师名称
|
|
||||||
*/
|
|
||||||
private String instructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 章节数
|
|
||||||
*/
|
|
||||||
private Integer chapterCount;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视频数
|
|
||||||
*/
|
|
||||||
private Integer videoCount;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 总时长(秒)
|
|
||||||
*/
|
|
||||||
private Integer totalDuration;
|
|
||||||
|
|
||||||
private Date createdAt;
|
|
||||||
|
|
||||||
private Date updatedAt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 课程描述
|
|
||||||
*/
|
|
||||||
private String description;
|
|
||||||
/**
|
|
||||||
* 视频语言编码 如 zh-CN, en-US
|
|
||||||
*/
|
|
||||||
private String languageCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 0:关闭;1:打开;
|
|
||||||
* */
|
|
||||||
|
|
||||||
private Integer aiSet;
|
|
||||||
/**
|
|
||||||
* 摘要 0:上架;1:下架;
|
|
||||||
* */
|
|
||||||
|
|
||||||
private Integer aiAbstract;
|
|
||||||
/**
|
|
||||||
* 文稿 0:上架;1:下架;
|
|
||||||
* */
|
|
||||||
|
|
||||||
private Integer aiDraft;
|
|
||||||
/**
|
|
||||||
* 翻译 0:上架;1:下架;
|
|
||||||
* */
|
|
||||||
|
|
||||||
private Integer aiTranslate;
|
|
||||||
|
|
||||||
private Integer languageStatus;
|
|
||||||
//摘要
|
|
||||||
private String summaryContent;
|
|
||||||
//摘要状态 0:下架;1:上架
|
|
||||||
private Integer summaryStatus;
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
package com.xboe.module.course.dto;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author
|
|
||||||
* 视频字幕表
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class BoeaiSubtitleRsp implements Serializable {
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关联视频ID
|
|
||||||
*/
|
|
||||||
private String videoId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字幕语言(如 zh-CN, en-US)
|
|
||||||
*/
|
|
||||||
private String language;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* WebVTT字幕文件URL(OSS地址)
|
|
||||||
*/
|
|
||||||
private String subtitleUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否原始字幕 0-翻译 1-原始
|
|
||||||
*/
|
|
||||||
private Byte isOriginal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 源语言/翻译来源(如 zh-CN)
|
|
||||||
*/
|
|
||||||
private String sourceLanguage;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 翻译引擎(llm/google/deepl)
|
|
||||||
*/
|
|
||||||
private String translateEngine;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态(0-待生成 1-生成中 2-已完成 3-失败)
|
|
||||||
*/
|
|
||||||
private Boolean status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
private Date createdAt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新时间
|
|
||||||
*/
|
|
||||||
private Date updatedAt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字幕数据(JSON 数组格式,包含时间戳和翻译文本)
|
|
||||||
*/
|
|
||||||
private String subtitleData;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* WebVTT 格式字幕内容
|
|
||||||
*/
|
|
||||||
private String vttContent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 错误信息
|
|
||||||
*/
|
|
||||||
private String errorMsg;
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
package com.xboe.module.course.dto;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author
|
|
||||||
* @date 2025年11月18日
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class BoeaiVideoResourceDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视频业务ID
|
|
||||||
*/
|
|
||||||
private String videoId;
|
|
||||||
/**
|
|
||||||
* 课程ID
|
|
||||||
*/
|
|
||||||
private String courseId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视频标题
|
|
||||||
*/
|
|
||||||
private String title;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 原始视频URL
|
|
||||||
*/
|
|
||||||
private String originalUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视频时长(秒)
|
|
||||||
*/
|
|
||||||
private Integer duration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件大小(字节)
|
|
||||||
*/
|
|
||||||
private Long fileSize;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视频格式 mp4/avi等
|
|
||||||
*/
|
|
||||||
private String format;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态 0-待处理 1-处理中 2-已完成 3-失败
|
|
||||||
*/
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否已审核 0-否 1-是
|
|
||||||
*/
|
|
||||||
private Integer isReviewed;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 审核人ID
|
|
||||||
*/
|
|
||||||
private String reviewerId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 审核时间
|
|
||||||
*/
|
|
||||||
private Date reviewedAt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private Date createdAt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private Date updatedAt;
|
|
||||||
}
|
|
||||||
@@ -32,11 +32,6 @@ public class CourseFullDto {
|
|||||||
*/
|
*/
|
||||||
private Course course;
|
private Course course;
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量课程AI设置课
|
|
||||||
*/
|
|
||||||
private List<Course> courseList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程资源信息
|
* 课程资源信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.xboe.module.course.entity;
|
package com.xboe.module.course.entity;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
@@ -35,9 +34,6 @@ public class Course extends BaseEntity {
|
|||||||
/**所有的设备*/
|
/**所有的设备*/
|
||||||
public static int DEVICE_ALL=3;
|
public static int DEVICE_ALL=3;
|
||||||
|
|
||||||
/**仅内网*/
|
|
||||||
public static int DEVICE_INTERNAL=4;
|
|
||||||
|
|
||||||
/**未提交,草稿*/
|
/**未提交,草稿*/
|
||||||
public static final int STATUS_NONE=1;
|
public static final int STATUS_NONE=1;
|
||||||
|
|
||||||
@@ -217,47 +213,6 @@ public class Course extends BaseEntity {
|
|||||||
@Column(name = "device",length = 1)
|
@Column(name = "device",length = 1)
|
||||||
private Integer device;
|
private Integer device;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 0:关闭;1:打开;
|
|
||||||
* */
|
|
||||||
// @Column(name = "ai_set",length = 1)
|
|
||||||
@Transient
|
|
||||||
private Integer aiSet;
|
|
||||||
/**
|
|
||||||
* 摘要 0:上架;1:下架;
|
|
||||||
* */
|
|
||||||
//@Column(name = "ai_abstract",length = 1)
|
|
||||||
@Transient
|
|
||||||
private Integer aiAbstract;
|
|
||||||
/**
|
|
||||||
* 文稿 0:上架;1:下架;
|
|
||||||
* */
|
|
||||||
// @Column(name = "ai_draft",length = 1)
|
|
||||||
@Transient
|
|
||||||
private Integer aiDraft;
|
|
||||||
/**
|
|
||||||
* 翻译 0:上架;1:下架;
|
|
||||||
* */
|
|
||||||
//@Column(name = "ai_translate",length = 1)
|
|
||||||
@Transient
|
|
||||||
private Integer aiTranslate;
|
|
||||||
@Transient
|
|
||||||
private Integer languageStatus;
|
|
||||||
/**
|
|
||||||
* 语言 zh-CN,en-US,ja-JP,ko-KR
|
|
||||||
* */
|
|
||||||
//Column(name = "language_code",length = 120)
|
|
||||||
@Transient
|
|
||||||
private List<String> languageCode;
|
|
||||||
|
|
||||||
//摘要
|
|
||||||
@Transient
|
|
||||||
private String summaryContent;
|
|
||||||
//摘要状态 0:下架;1:上架
|
|
||||||
@Transient
|
|
||||||
private Integer summaryStatus;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程状态,多人审核机制,所以这里并没有审核通过与不通过的状态了
|
* 课程状态,多人审核机制,所以这里并没有审核通过与不通过的状态了
|
||||||
* 课程状态 1:未提交(草稿);2:已提交;3: 审核未通过,5审核完成
|
* 课程状态 1:未提交(草稿);2:已提交;3: 审核未通过,5审核完成
|
||||||
|
|||||||
@@ -8,12 +8,9 @@ import javax.persistence.Transient;
|
|||||||
import com.xboe.core.SysConstant;
|
import com.xboe.core.SysConstant;
|
||||||
import com.xboe.core.orm.BaseEntity;
|
import com.xboe.core.orm.BaseEntity;
|
||||||
|
|
||||||
import com.xboe.module.course.dto.BoeaiSubtitleRsp;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程内容表
|
* 课程内容表
|
||||||
* */
|
* */
|
||||||
@@ -97,9 +94,6 @@ public class CourseContent extends BaseEntity {
|
|||||||
@Transient
|
@Transient
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@Transient
|
|
||||||
List<BoeaiSubtitleRsp> boeaiSubtitleRspList;
|
|
||||||
|
|
||||||
public CourseContent() {
|
public CourseContent() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
package com.xboe.module.course.entity;
|
|
||||||
|
|
||||||
import com.xboe.core.SysConstant;
|
|
||||||
import com.xboe.core.orm.IdBaseEntity;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import javax.persistence.Column;
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 课程任课教师删除记录
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Entity
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@Table(name = SysConstant.TABLE_PRE + "course_teacher_deleted_record")
|
|
||||||
public class CourseTeacherDeletedRecord extends IdBaseEntity {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 课程id
|
|
||||||
*/
|
|
||||||
@Column(name = "course_id", nullable = false, length = 20)
|
|
||||||
private String courseId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 教师id,实际上就是aid
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Column(name = "teacher_id", nullable = false, length = 20)
|
|
||||||
private String teacherId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 教师姓名
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Column(name = "teacher_name", length = 30)
|
|
||||||
private String teacherName;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
package com.xboe.module.course.entity;
|
|
||||||
|
|
||||||
import com.xboe.core.SysConstant;
|
|
||||||
import com.xboe.core.orm.IdBaseEntity;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 讲师删除记录表
|
|
||||||
* 为了监控PngCode-SZX-1227问题临时创建的表
|
|
||||||
*
|
|
||||||
* @author guo jia
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Entity
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Table(name = SysConstant.TABLE_PRE + "modify_log")
|
|
||||||
public class ModifyLog extends IdBaseEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 请求ID
|
|
||||||
*/
|
|
||||||
private String requestId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 位置
|
|
||||||
*/
|
|
||||||
private String location;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 请求body
|
|
||||||
*/
|
|
||||||
private String body;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注信息
|
|
||||||
*/
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -341,6 +341,8 @@ public interface ICourseService {
|
|||||||
List<Course> mobiledelList(Integer num,CourseQueryDto courseQueryDto);
|
List<Course> mobiledelList(Integer num,CourseQueryDto courseQueryDto);
|
||||||
|
|
||||||
|
|
||||||
List<Course> findByIds(List<String> courseIds);
|
|
||||||
void deletedStudyResourceBatchByCourseIdAndType(String courseId,Integer courseType);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.xboe.module.course.service.impl;
|
package com.xboe.module.course.service.impl;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
@@ -15,29 +14,13 @@ import java.util.stream.Stream;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.management.Query;
|
import javax.management.Query;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import cn.hutool.json.JSONUtil;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.xboe.api.ThirdApi;
|
import com.xboe.api.ThirdApi;
|
||||||
import com.xboe.core.orm.*;
|
import com.xboe.core.orm.*;
|
||||||
import com.xboe.module.course.dao.*;
|
|
||||||
import com.xboe.module.course.dto.*;
|
|
||||||
import com.xboe.module.course.entity.*;
|
|
||||||
import com.xboe.module.course.utils.HttpUtils;
|
|
||||||
import com.xboe.school.study.dao.StudyCourseDao;
|
import com.xboe.school.study.dao.StudyCourseDao;
|
||||||
import com.xboe.school.study.entity.StudyCourse;
|
import com.xboe.school.study.entity.StudyCourse;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.elasticsearch.client.RequestOptions;
|
|
||||||
import org.elasticsearch.client.RestHighLevelClient;
|
|
||||||
import org.elasticsearch.index.query.BoolQueryBuilder;
|
|
||||||
import org.elasticsearch.index.query.QueryBuilders;
|
|
||||||
import org.elasticsearch.index.reindex.DeleteByQueryRequest;
|
|
||||||
import org.hibernate.mapping.IdGenerator;
|
import org.hibernate.mapping.IdGenerator;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
@@ -51,6 +34,24 @@ import com.xboe.common.beans.KeyValue;
|
|||||||
import com.xboe.common.utils.IDGenerator;
|
import com.xboe.common.utils.IDGenerator;
|
||||||
import com.xboe.common.utils.StringUtil;
|
import com.xboe.common.utils.StringUtil;
|
||||||
import com.xboe.core.event.IEventDataSender;
|
import com.xboe.core.event.IEventDataSender;
|
||||||
|
import com.xboe.module.course.dao.CourseContentDao;
|
||||||
|
import com.xboe.module.course.dao.CourseCrowdDao;
|
||||||
|
import com.xboe.module.course.dao.CourseDao;
|
||||||
|
import com.xboe.module.course.dao.CourseExamDao;
|
||||||
|
import com.xboe.module.course.dao.CourseHRBPAuditDao;
|
||||||
|
import com.xboe.module.course.dao.CourseHomeWorkDao;
|
||||||
|
import com.xboe.module.course.dao.CourseSectionDao;
|
||||||
|
import com.xboe.module.course.dao.CourseTeacherDao;
|
||||||
|
import com.xboe.module.course.dao.CourseUpdateLogDao;
|
||||||
|
import com.xboe.module.course.dto.CourseFullDto;
|
||||||
|
import com.xboe.module.course.dto.CourseQueryDto;
|
||||||
|
import com.xboe.module.course.dto.RankingDto;
|
||||||
|
import com.xboe.module.course.entity.Course;
|
||||||
|
import com.xboe.module.course.entity.CourseCrowd;
|
||||||
|
import com.xboe.module.course.entity.CourseHRBPAudit;
|
||||||
|
import com.xboe.module.course.entity.CourseSection;
|
||||||
|
import com.xboe.module.course.entity.CourseTeacher;
|
||||||
|
import com.xboe.module.course.entity.CourseUpdateLog;
|
||||||
import com.xboe.module.course.service.ICourseFullTextSearch;
|
import com.xboe.module.course.service.ICourseFullTextSearch;
|
||||||
import com.xboe.module.course.service.ICourseService;
|
import com.xboe.module.course.service.ICourseService;
|
||||||
import com.xboe.module.interaction.service.ICourseGradeService;
|
import com.xboe.module.interaction.service.ICourseGradeService;
|
||||||
@@ -114,17 +115,7 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
@Autowired(required = false)
|
@Autowired(required = false)
|
||||||
private IEventDataSender eventSender;
|
private IEventDataSender eventSender;
|
||||||
|
|
||||||
@Resource
|
|
||||||
RestHighLevelClient restHighLevelClient;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private CourseTeacherDeletedRecordDao courseTeacherDeletedRecordDao;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ModifyLogDao modifyLogDao;
|
|
||||||
|
|
||||||
@Value("${kjb.aicoreUrl}")
|
|
||||||
private String aicoreUrl;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成过滤条件
|
* 生成过滤条件
|
||||||
@@ -182,8 +173,6 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
filters.add(FieldFilters.in("device", Course.DEVICE_MOBILE, Course.DEVICE_ALL));
|
filters.add(FieldFilters.in("device", Course.DEVICE_MOBILE, Course.DEVICE_ALL));
|
||||||
} else if (dto.getDevice() == Course.DEVICE_ALL) {
|
} else if (dto.getDevice() == Course.DEVICE_ALL) {
|
||||||
filters.add(FieldFilters.eq("device", Course.DEVICE_ALL));
|
filters.add(FieldFilters.eq("device", Course.DEVICE_ALL));
|
||||||
} else if (dto.getDevice() == Course.DEVICE_INTERNAL) {
|
|
||||||
filters.add(FieldFilters.eq("device", Course.DEVICE_INTERNAL));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -366,7 +355,6 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
// // 使用distinct()配合自定义的去重条件
|
// // 使用distinct()配合自定义的去重条件
|
||||||
// .filter(distinctByKey(c -> c.getId()))
|
// .filter(distinctByKey(c -> c.getId()))
|
||||||
// .collect(Collectors.toList());
|
// .collect(Collectors.toList());
|
||||||
|
|
||||||
//// PageList<Course> rs=courseDao.findPage(pageIndex, pageSize, filters, oc);
|
//// PageList<Course> rs=courseDao.findPage(pageIndex, pageSize, filters, oc);
|
||||||
//// long endTime = System.nanoTime();
|
//// long endTime = System.nanoTime();
|
||||||
// //log.info("查询出的条数:"+rs.getCount());
|
// //log.info("查询出的条数:"+rs.getCount());
|
||||||
@@ -462,45 +450,9 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
rs.setCount(listByFilters2.size());
|
rs.setCount(listByFilters2.size());
|
||||||
rs.setPageSize(pageSize);
|
rs.setPageSize(pageSize);
|
||||||
rs.setList(paginate);
|
rs.setList(paginate);
|
||||||
if (paginate != null && !paginate.isEmpty()) {
|
|
||||||
log.info("-----KJB------ getCourse");
|
|
||||||
for (Course course : paginate) {
|
|
||||||
this.getCourseFromKJB(course);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return rs;
|
return rs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getCourseFromKJB(Course course){
|
|
||||||
String courseId = course.getId();
|
|
||||||
log.info("------------KJB---获取课程信息---------: courseId = " + courseId);
|
|
||||||
//String url = env.getProperty("kjb.url") + "/api/course/getCourseFromKJB?courseId=" + courseId;
|
|
||||||
String url = aicoreUrl + "/aiVideo/getCourseList";
|
|
||||||
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
|
||||||
JSONArray courseIds = new JSONArray();
|
|
||||||
courseIds.add(courseId);
|
|
||||||
jsonObject.put("courseIds", courseIds);
|
|
||||||
String result = HttpUtils.sendMessage(jsonObject.toJSONString(), url);
|
|
||||||
log.info("---KJB --getCourseList 接口返回结果result: "+result);
|
|
||||||
JSONObject jsonResult = JSONObject.parseObject(result);
|
|
||||||
String data = jsonResult.getString("rows");
|
|
||||||
|
|
||||||
List<BoeaiCourseDto> boeaiCourseDto = JSON.parseArray(data, BoeaiCourseDto.class);
|
|
||||||
//List<BoeaiCourseDto> aiVideoResourceRsp = Collections.singletonList(JSON.parseObject(data, BoeaiCourseDto.class));
|
|
||||||
if(boeaiCourseDto != null && !boeaiCourseDto.isEmpty()){
|
|
||||||
log.info("KJB摘要信息:"+boeaiCourseDto.get(0).getSummaryContent());
|
|
||||||
course.setSummaryContent(boeaiCourseDto.get(0).getSummaryContent());
|
|
||||||
course.setSummaryStatus(boeaiCourseDto.get(0).getSummaryStatus());
|
|
||||||
course.setAiSet(boeaiCourseDto.get(0).getAiSet());
|
|
||||||
course.setAiAbstract(boeaiCourseDto.get(0).getAiAbstract());
|
|
||||||
course.setAiDraft(boeaiCourseDto.get(0).getAiDraft());
|
|
||||||
course.setAiTranslate(boeaiCourseDto.get(0).getAiTranslate());
|
|
||||||
course.setLanguageStatus(boeaiCourseDto.get(0).getLanguageStatus());
|
|
||||||
course.setLanguageCode(boeaiCourseDto.get(0).getLanguageCode() == null ? new ArrayList<>() :Arrays.asList(boeaiCourseDto.get(0).getLanguageCode().split(",")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Set<String> getSeache(CourseQueryDto dto) {
|
private Set<String> getSeache(CourseQueryDto dto) {
|
||||||
//需要设置为隐藏的课程id
|
//需要设置为隐藏的课程id
|
||||||
Set<String> list = new HashSet<>();
|
Set<String> list = new HashSet<>();
|
||||||
@@ -902,14 +854,12 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
log.error("未配置事件消息发送的实现");
|
log.error("未配置事件消息发送的实现");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除ES数据
|
|
||||||
deletedStudyResourceBatchByCourseIdAndType(id, c.getType());
|
|
||||||
} else {
|
} else {
|
||||||
//彻底删除,课件设置为无课程状态
|
//彻底删除,课件设置为无课程状态
|
||||||
courseDao.setDeleted(id);
|
courseDao.setDeleted(id);
|
||||||
}
|
}
|
||||||
//记录删除日志信息
|
//记录删除日志信息
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -956,7 +906,6 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
for (CourseTeacher ct : full.getTeachers()) {
|
for (CourseTeacher ct : full.getTeachers()) {
|
||||||
ct.setCourseId(c.getId());
|
ct.setCourseId(c.getId());
|
||||||
courseTeacherDao.save(ct);
|
courseTeacherDao.save(ct);
|
||||||
addBoeCourseTeacherModifyLog(ct, "M1位置讲师名修改", JSONUtil.toJsonStr(ct), null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (full.getCrowds() != null && !full.getCrowds().isEmpty()) {
|
if (full.getCrowds() != null && !full.getCrowds().isEmpty()) {
|
||||||
@@ -1039,15 +988,12 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
c.setSysVersion(courseDao.getVersion(c.getId()));
|
c.setSysVersion(courseDao.getVersion(c.getId()));
|
||||||
full.getCourse().setSysVersion(c.getSysVersion());
|
full.getCourse().setSysVersion(c.getSysVersion());
|
||||||
|
|
||||||
// 兼容处理,记录下删除的关联数据
|
|
||||||
createCourseTeacherDeletedRecord(c.getId());
|
|
||||||
//先清空教师信息, 教师信息如果不一样了,也要加入到日志中
|
//先清空教师信息, 教师信息如果不一样了,也要加入到日志中
|
||||||
courseTeacherDao.deleteByField("courseId", c.getId());
|
courseTeacherDao.deleteByField("courseId", c.getId());
|
||||||
if (full.getTeachers() != null && !full.getTeachers().isEmpty()) {
|
if (full.getTeachers() != null && !full.getTeachers().isEmpty()) {
|
||||||
for (CourseTeacher ct : full.getTeachers()) {
|
for (CourseTeacher ct : full.getTeachers()) {
|
||||||
ct.setCourseId(c.getId());
|
ct.setCourseId(c.getId());
|
||||||
courseTeacherDao.saveOrUpdate(ct);
|
courseTeacherDao.saveOrUpdate(ct);
|
||||||
addBoeCourseTeacherModifyLog(ct, "M2位置讲师名修改", JSONUtil.toJsonStr(ct), null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//先清空受众信息,受众信息如果不一样了,也要加入到日志中
|
//先清空受众信息,受众信息如果不一样了,也要加入到日志中
|
||||||
@@ -1096,15 +1042,12 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
c.setSysVersion(courseDao.getVersion(c.getId()));
|
c.setSysVersion(courseDao.getVersion(c.getId()));
|
||||||
full.getCourse().setSysVersion(c.getSysVersion());
|
full.getCourse().setSysVersion(c.getSysVersion());
|
||||||
|
|
||||||
// 兼容处理,记录下删除的关联数据
|
|
||||||
createCourseTeacherDeletedRecord(c.getId());
|
|
||||||
//先清空教师信息, 教师信息如果不一样了,也要加入到日志中
|
//先清空教师信息, 教师信息如果不一样了,也要加入到日志中
|
||||||
courseTeacherDao.deleteByField("courseId", c.getId());
|
courseTeacherDao.deleteByField("courseId", c.getId());
|
||||||
if (full.getTeachers() != null && !full.getTeachers().isEmpty()) {
|
if (full.getTeachers() != null && !full.getTeachers().isEmpty()) {
|
||||||
for (CourseTeacher ct : full.getTeachers()) {
|
for (CourseTeacher ct : full.getTeachers()) {
|
||||||
ct.setCourseId(c.getId());
|
ct.setCourseId(c.getId());
|
||||||
courseTeacherDao.saveOrUpdate(ct);
|
courseTeacherDao.saveOrUpdate(ct);
|
||||||
addBoeCourseTeacherModifyLog(ct, "M3位置讲师名修改", JSONUtil.toJsonStr(ct), null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//先清空受众信息,受众信息如果不一样了,也要加入到日志中
|
//先清空受众信息,受众信息如果不一样了,也要加入到日志中
|
||||||
@@ -1134,15 +1077,12 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
c.setPublishTime(LocalDateTime.now());
|
c.setPublishTime(LocalDateTime.now());
|
||||||
courseDao.update(c);
|
courseDao.update(c);
|
||||||
|
|
||||||
// 兼容处理,记录下删除的关联数据
|
|
||||||
createCourseTeacherDeletedRecord(c.getId());
|
|
||||||
//先清空教师信息, 教师信息如果不一样了,也要加入到日志中
|
//先清空教师信息, 教师信息如果不一样了,也要加入到日志中
|
||||||
courseTeacherDao.deleteByField("courseId", c.getId());
|
courseTeacherDao.deleteByField("courseId", c.getId());
|
||||||
if (full.getTeachers() != null && !full.getTeachers().isEmpty()) {
|
if (full.getTeachers() != null && !full.getTeachers().isEmpty()) {
|
||||||
for (CourseTeacher ct : full.getTeachers()) {
|
for (CourseTeacher ct : full.getTeachers()) {
|
||||||
ct.setCourseId(c.getId());
|
ct.setCourseId(c.getId());
|
||||||
courseTeacherDao.saveOrUpdate(ct);
|
courseTeacherDao.saveOrUpdate(ct);
|
||||||
addBoeCourseTeacherModifyLog(ct, "M4位置讲师名修改", JSONUtil.toJsonStr(ct), null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//先清空受众信息,受众信息如果不一样了,也要加入到日志中
|
//先清空受众信息,受众信息如果不一样了,也要加入到日志中
|
||||||
@@ -1628,13 +1568,6 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Course> findByIds(List<String> courseIds) {
|
|
||||||
QueryBuilder query = QueryBuilder.from(Course.class);
|
|
||||||
query.addFilter(FieldFilters.in("id", courseIds));
|
|
||||||
return courseDao.findList(query.builder());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int countWaitAudit(String aid) {
|
public int countWaitAudit(String aid) {
|
||||||
@@ -2046,54 +1979,5 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
return courseDao.findListByHql("Select new Course(id,studys,score) from Course where id in(?1)", ids);
|
return courseDao.findListByHql("Select new Course(id,studys,score) from Course where id in(?1)", ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deletedStudyResourceBatchByCourseIdAndType(String courseId, Integer courseType) {
|
|
||||||
DeleteByQueryRequest request = new DeleteByQueryRequest("new_study_resource");
|
|
||||||
BoolQueryBuilder boolQueryBuilder = new BoolQueryBuilder();
|
|
||||||
boolQueryBuilder.must(QueryBuilders.matchQuery("courseId", courseId));
|
|
||||||
boolQueryBuilder.must(QueryBuilders.matchQuery("courseType", courseType));
|
|
||||||
request.setQuery(boolQueryBuilder);
|
|
||||||
try {
|
|
||||||
restHighLevelClient.deleteByQuery(request, RequestOptions.DEFAULT);
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除boe_course_teacher数据时把删除的数据储存到boe_course_teacher_deleted_record表
|
|
||||||
* boe_course_teacher表没有deleted字段,兼容处理
|
|
||||||
*
|
|
||||||
* @param courseId 课程ID
|
|
||||||
*/
|
|
||||||
private void createCourseTeacherDeletedRecord(String courseId) {
|
|
||||||
List<CourseTeacherDeletedRecord> courseTeacherList = courseTeacherDao.findList(FieldFilters.eq("courseId", courseId)).stream().map(ct -> {
|
|
||||||
CourseTeacherDeletedRecord courseTeacherDeletedRecord = new CourseTeacherDeletedRecord();
|
|
||||||
courseTeacherDeletedRecord.setCourseId(ct.getCourseId());
|
|
||||||
courseTeacherDeletedRecord.setTeacherId(ct.getTeacherId());
|
|
||||||
courseTeacherDeletedRecord.setTeacherName(ct.getTeacherName());
|
|
||||||
return courseTeacherDeletedRecord;
|
|
||||||
}).collect(Collectors.toList());
|
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(courseTeacherList)) {
|
|
||||||
courseTeacherDeletedRecordDao.saveList(courseTeacherList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 增加boe_course_teacher的teacher_name字段被改为"BOE教师"的监控
|
|
||||||
*/
|
|
||||||
private void addBoeCourseTeacherModifyLog(CourseTeacher ct, String location, String body, String remark) {
|
|
||||||
try {
|
|
||||||
if (ct == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Objects.equals(ct.getTeacherName(), "BOE教师")) {
|
|
||||||
modifyLogDao.insert(null, location, body, remark);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("创建boe_course_teacher记录失败", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
package com.xboe.module.course.utils;
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.apache.http.HttpEntity;
|
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
||||||
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.apache.http.util.EntityUtils;
|
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author
|
|
||||||
* @date 2025年11月18日
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
public class HttpUtils {
|
|
||||||
public static String sendMessage(String message,String url) {
|
|
||||||
//log.info("----------------发送消息开始 -------");
|
|
||||||
log.info("----------------发送消息参数 -------{},url:{}",message,url);
|
|
||||||
// POST 请求
|
|
||||||
try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
|
|
||||||
// POST 请求
|
|
||||||
HttpPost httpPost = new HttpPost(url);
|
|
||||||
//HttpPost httpPost = new HttpPost("https://jsonplaceholder.typicode.com/posts");
|
|
||||||
httpPost.setEntity(new StringEntity(message, StandardCharsets.UTF_8));
|
|
||||||
httpPost.setHeader("Content-Type", "application/json; charset=utf-8");
|
|
||||||
httpPost.setHeader("Accept", "application/json");
|
|
||||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
|
||||||
|
|
||||||
HttpEntity responseEntity = response.getEntity();
|
|
||||||
String responseBody = "";
|
|
||||||
if (responseEntity != null) {
|
|
||||||
responseBody = EntityUtils.toString(responseEntity, StandardCharsets.UTF_8);
|
|
||||||
System.out.println("Response Body: " + responseBody);
|
|
||||||
}
|
|
||||||
log.info("---------------发送消息响应 -------{}",responseBody);
|
|
||||||
return responseBody;
|
|
||||||
// System.out.println("状态码: " + response.getCode());
|
|
||||||
// System.out.println("响应体: " + EntityUtils.toString(response.getEntity()));
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("KJB-接口调用失败",e);
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.xboe.module.popup.entity;
|
package com.xboe.module.popup.entity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.xboe.core.SysConstant;
|
import com.xboe.core.SysConstant;
|
||||||
import com.xboe.core.orm.IdEntity;
|
import com.xboe.core.orm.IdEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -25,14 +24,12 @@ public class Popup extends IdEntity {
|
|||||||
* 开始时间
|
* 开始时间
|
||||||
* */
|
* */
|
||||||
@Column(name = "start_time")
|
@Column(name = "start_time")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private LocalDateTime startTime;
|
private LocalDateTime startTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结束时间
|
* 结束时间
|
||||||
* */
|
* */
|
||||||
@Column(name = "end_time")
|
@Column(name = "end_time")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private LocalDateTime endTime;
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,27 +9,15 @@ import java.util.function.Function;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
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;
|
import com.alibaba.nacos.shaded.com.google.common.util.concurrent.RateLimiter;
|
||||||
import com.boe.feign.api.infrastructure.entity.CommonSearchVo;
|
|
||||||
import com.boe.feign.api.infrastructure.entity.Dict;
|
|
||||||
import com.xboe.api.ThirdApi;
|
import com.xboe.api.ThirdApi;
|
||||||
import com.xboe.constants.CacheName;
|
import com.xboe.constants.CacheName;
|
||||||
import com.xboe.module.course.api.CourseFullTextApi;
|
|
||||||
import com.xboe.module.course.dto.AiVideoResourceRsp;
|
|
||||||
import com.xboe.module.course.dto.BoeaiSubtitleRsp;
|
|
||||||
import com.xboe.module.course.dto.CourseFullText;
|
|
||||||
import com.xboe.module.course.utils.HttpUtils;
|
|
||||||
import com.xboe.module.course.vo.TeacherVo;
|
import com.xboe.module.course.vo.TeacherVo;
|
||||||
import com.xboe.module.usergroup.service.IUserGroupService;
|
import com.xboe.module.usergroup.service.IUserGroupService;
|
||||||
import com.xboe.school.study.dao.StudyCourseDao;
|
import com.xboe.school.study.dao.StudyCourseDao;
|
||||||
import com.xboe.school.vo.StudyTimeVo;
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -73,7 +61,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
//添加AI课程学习内容
|
|
||||||
/**
|
/**
|
||||||
* 课程学习的内容
|
* 课程学习的内容
|
||||||
*/
|
*/
|
||||||
@@ -112,12 +100,6 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
@Autowired
|
@Autowired
|
||||||
StringRedisTemplate redisTemplate;
|
StringRedisTemplate redisTemplate;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
CourseFullTextApi courseFullTextApi;
|
|
||||||
|
|
||||||
@Value("${kjb.aicoreUrl}")
|
|
||||||
private String aicoreUrl;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用于查询课程的学习记录
|
* 用于查询课程的学习记录
|
||||||
* @param pager
|
* @param pager
|
||||||
@@ -184,12 +166,6 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
if(course==null || course.getDeleted()){
|
if(course==null || course.getDeleted()){
|
||||||
return badRequest("课程不存在或已被删除");
|
return badRequest("课程不存在或已被删除");
|
||||||
}
|
}
|
||||||
//获取课程AI详情
|
|
||||||
log.info("---- KJB 获取课程详情 ---");
|
|
||||||
CourseFullText courseFullText = new CourseFullText();
|
|
||||||
courseFullText.setId(cid);
|
|
||||||
courseFullTextApi.getCourseFromKJB(courseFullText,course);
|
|
||||||
|
|
||||||
rs.put("course",course);
|
rs.put("course",course);
|
||||||
|
|
||||||
List<CourseCrowd> courseCrowdList = courseService.findCrowdByCourseId(cid);
|
List<CourseCrowd> courseCrowdList = courseService.findCrowdByCourseId(cid);
|
||||||
@@ -228,13 +204,6 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
List<CourseSection> sectionlist=sectionService.getByCourseId(cid);
|
List<CourseSection> sectionlist=sectionService.getByCourseId(cid);
|
||||||
List<CourseTeacher> teachers=courseService.findTeachersByCourseId(cid);
|
List<CourseTeacher> teachers=courseService.findTeachersByCourseId(cid);
|
||||||
|
|
||||||
if(cclist!=null && !cclist.isEmpty()){
|
|
||||||
for (CourseContent cc : cclist) {
|
|
||||||
log.info("根据视频信息查询AI字幕数据:cc = " + cc.toString());
|
|
||||||
this.getVtt( cid , cc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取教师的介绍信息,因为一门课程 的教师不会太多,所以这里简单直接遍历查询,后续再优化
|
//获取教师的介绍信息,因为一门课程 的教师不会太多,所以这里简单直接遍历查询,后续再优化
|
||||||
for(CourseTeacher ct : teachers) {
|
for(CourseTeacher ct : teachers) {
|
||||||
Teacher t = teacherService.get(ct.getTeacherId());
|
Teacher t = teacherService.get(ct.getTeacherId());
|
||||||
@@ -259,34 +228,10 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rs.put("isCrowd",pass);
|
rs.put("isCrowd",pass);
|
||||||
rs.put("contents",cclist);
|
rs.put("contents",cclist);
|
||||||
rs.put("sections",sectionlist);
|
rs.put("sections",sectionlist);
|
||||||
rs.put("teachers",teachers);
|
rs.put("teachers",teachers);
|
||||||
// 未选择仅内网时isPermission = false,不用区分内外网
|
|
||||||
boolean isPermission = false;
|
|
||||||
if(course.getDevice() ==4){
|
|
||||||
CommonSearchVo searcher = new CommonSearchVo();
|
|
||||||
searcher.setPid(637L);
|
|
||||||
searcher.setType(1);
|
|
||||||
List<Dict> dictList = thirdApi.getDictItems(searcher);
|
|
||||||
if(dictList != null && dictList.size() > 0){
|
|
||||||
List<String> dicts = dictList.stream().map(Dict::getValue).collect(Collectors.toList());
|
|
||||||
// 选择仅内网 并且字典中配置了此课程资源归属,那么只能内网观看 返回 truw
|
|
||||||
isPermission = dicts.contains(course.getOrgId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
rs.put("isPermission",isPermission);
|
|
||||||
|
|
||||||
CommonSearchVo warn = new CommonSearchVo();
|
|
||||||
warn.setCode("course_warn");
|
|
||||||
warn.setType(1);
|
|
||||||
List<Dict> warns = thirdApi.getDictItems(warn);
|
|
||||||
if(warns != null && warns.size() > 0){
|
|
||||||
rs.put("warn",warns.get(0).getValue());
|
|
||||||
rs.put("warnTitle",warns.get(0).getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
//检查是否已报名
|
//检查是否已报名
|
||||||
StudyCourse sc=service.findByCourseIdAndAid(cid, aid);
|
StudyCourse sc=service.findByCourseIdAndAid(cid, aid);
|
||||||
@@ -330,6 +275,19 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询redis上面的key,并解析value获取到lastStudyTime
|
||||||
|
String lastActive = redisTemplate.opsForValue().get("studyContentId:" + item.getId() + ":last_active");
|
||||||
|
if (StringUtil.isNotBlank(lastActive)) {
|
||||||
|
String[] parts = lastActive.split("&");
|
||||||
|
if (parts.length == 2) {
|
||||||
|
int lastStudyTimeRedis = Integer.parseInt(parts[0]);
|
||||||
|
log.info("study-video-time-redis获取---lastStudyTimeRedis = " + lastStudyTimeRedis);
|
||||||
|
if(lastStudyTimeRedis>0){
|
||||||
|
item.setLastStudyTime(lastStudyTimeRedis);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BigDecimal lastStudyTime = new BigDecimal(item.getLastStudyTime());
|
BigDecimal lastStudyTime = new BigDecimal(item.getLastStudyTime());
|
||||||
BigDecimal duration = new BigDecimal(content.getDuration());
|
BigDecimal duration = new BigDecimal(content.getDuration());
|
||||||
BigDecimal progress = lastStudyTime.divide(duration, 10, RoundingMode.HALF_UP);
|
BigDecimal progress = lastStudyTime.divide(duration, 10, RoundingMode.HALF_UP);
|
||||||
@@ -349,35 +307,6 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
return success(rs);
|
return success(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getVtt(String couirseId, CourseContent cc){
|
|
||||||
log.info("------KJB --------- getVtt couirseId = " + couirseId + " videoId = " + cc.getId());
|
|
||||||
String url = aicoreUrl + "/aiVideo/getVideoVtt";
|
|
||||||
JSONObject message = new JSONObject();
|
|
||||||
message.put("courseId", couirseId);
|
|
||||||
message.put("videoId", cc.getId());
|
|
||||||
String result = HttpUtils.sendMessage(message.toJSONString(), url);
|
|
||||||
if(StringUtils.isBlank(result)){
|
|
||||||
log.error("未获取到AI字幕信息");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//将返回string 转为json对象
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
||||||
String data = jsonObject.getString("data");
|
|
||||||
//json字符串转为实体对象
|
|
||||||
AiVideoResourceRsp aiVideoResourceRsp = JSON.parseObject(data, AiVideoResourceRsp.class);
|
|
||||||
log.info("aiVideoResourceRsp:"+aiVideoResourceRsp);
|
|
||||||
//循环json对象
|
|
||||||
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);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在打开课程详细页面的时候,调用此接口,返回学习课程信息,上次学习的位置。<br/>
|
* 在打开课程详细页面的时候,调用此接口,返回学习课程信息,上次学习的位置。<br/>
|
||||||
* 如果没有就返回空<br>
|
* 如果没有就返回空<br>
|
||||||
@@ -650,8 +579,8 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
studyService.finishVideoStudyItem(itemId, studyId,courseId,cnum,token);
|
studyService.finishVideoStudyItem(itemId, studyId,courseId,cnum,token);
|
||||||
// List<StudyCourse> allUserList = thirdApi.getStudyCourseList(studyId ,courseId, token);
|
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(studyId ,courseId, token);
|
||||||
// log.info("在线课学习记录"+allUserList);
|
log.info("在线课学习记录"+allUserList);
|
||||||
return success(true);
|
return success(true);
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
log.error("记录内容学习完成错误",e);
|
log.error("记录内容学习完成错误",e);
|
||||||
@@ -727,90 +656,6 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* appendtime 于 study-video-time 合并
|
|
||||||
* */
|
|
||||||
/*@RequestMapping(value="/updateStudyVideoTime1",method = {RequestMethod.GET,RequestMethod.POST})
|
|
||||||
public JsonResponse<String> updateStudyVideoTime1(StudyTimeVo studyTime, HttpServletRequest request){
|
|
||||||
|
|
||||||
// 0 study-video-time , 1 appendtime
|
|
||||||
if (studyTime.getType() == 0){
|
|
||||||
if(StringUtils.isBlank(studyTime.getItemId())){
|
|
||||||
return error("参数错误");
|
|
||||||
}
|
|
||||||
if(studyTime.getVideoTime()==null){
|
|
||||||
return error("无时间点");
|
|
||||||
}
|
|
||||||
//检查是否已存在
|
|
||||||
try {
|
|
||||||
studyService.updateLastTime(studyTime.getItemId(),studyTime.getVideoTime(), getCurrent().getAccountId());
|
|
||||||
if (studyTime.getContentId() != null && studyTime.getCourseId() != null && studyTime.getProgressVideo() != null){
|
|
||||||
contentService.updateProcessVideo(studyTime.getContentId(), studyTime.getCourseId(), studyTime.getProgressVideo());
|
|
||||||
}
|
|
||||||
return success("true");
|
|
||||||
}catch(Exception e) {
|
|
||||||
log.error("updateStudyVideoTime type =0 记录最后学习时间错误",e);
|
|
||||||
return error("updateStudyVideoTime type =0 记录最后学习时间失败 ",e.getMessage());
|
|
||||||
}
|
|
||||||
}else if(studyTime.getType() == 1){
|
|
||||||
if(StringUtils.isBlank(studyTime.getStudyId())){
|
|
||||||
return error("参数错误");
|
|
||||||
}
|
|
||||||
if(StringUtils.isBlank(studyTime.getCourseId())){
|
|
||||||
return error("未指定课程");
|
|
||||||
}
|
|
||||||
if(StringUtils.isBlank(studyTime.getContentId())){
|
|
||||||
return error("未指定资源内容");
|
|
||||||
}
|
|
||||||
|
|
||||||
String token = request.getHeader("Xboe-Access-Token");
|
|
||||||
if (StringUtils.isEmpty(token)) {
|
|
||||||
token = request.getHeader("token");
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
studyService.updateStudyDuration(studyTime.getStudyId(),null,studyTime.getContentId(),studyTime.getVideoTime(),studyTime.getCourseId());
|
|
||||||
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(studyTime.getStudyId() ,studyTime.getCourseId(), token);
|
|
||||||
log.info("updateStudyVideoTime type =1 在线课学习记录 = " + allUserList);
|
|
||||||
return success(studyTime.getId());
|
|
||||||
}catch(Exception e) {
|
|
||||||
log.error("updateStudyVideoTime type =1 记录学习时长错误",e);
|
|
||||||
return error("updateStudyVideoTime type =1 记录学习时长错误 ",e.getMessage());
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
return error("type不能为空");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
@RequestMapping(value="/updateStudyVideoTime",method = {RequestMethod.GET,RequestMethod.POST})
|
|
||||||
public JsonResponse<String> updateStudyVideoTime(StudyTimeVo studyTime, HttpServletRequest request){
|
|
||||||
try {
|
|
||||||
if(StringUtils.isBlank(studyTime.getItemId())){
|
|
||||||
return error("参数错误");
|
|
||||||
}
|
|
||||||
if(studyTime.getVideoTime()==null){
|
|
||||||
return error("无时间点");
|
|
||||||
}
|
|
||||||
if(StringUtils.isBlank(studyTime.getStudyId())){
|
|
||||||
return error("参数错误");
|
|
||||||
}
|
|
||||||
if(StringUtils.isBlank(studyTime.getCourseId())){
|
|
||||||
return error("未指定课程");
|
|
||||||
}
|
|
||||||
if(StringUtils.isBlank(studyTime.getContentId())){
|
|
||||||
return error("未指定资源内容");
|
|
||||||
}
|
|
||||||
studyService.updateStudyDuration(studyTime.getStudyId(),studyTime.getItemId(),studyTime.getContentId(),studyTime.getVideoTime(),studyTime.getCourseId());
|
|
||||||
if (studyTime.getContentId() != null && studyTime.getCourseId() != null && studyTime.getProgressVideo() != null){
|
|
||||||
contentService.updateProcessVideo(studyTime.getContentId(), studyTime.getCourseId(), studyTime.getProgressVideo());
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("updateStudyVideoTime",e);
|
|
||||||
return error("学习时长记录失败",e.getMessage(),null);
|
|
||||||
}
|
|
||||||
return success("true");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**获取最后一次的学习内容*/
|
/**获取最后一次的学习内容*/
|
||||||
@GetMapping("/last-study")
|
@GetMapping("/last-study")
|
||||||
public JsonResponse<Map<String,Object>> lastStudy(){
|
public JsonResponse<Map<String,Object>> lastStudy(){
|
||||||
|
|||||||
@@ -3,16 +3,9 @@ package com.xboe.school.study.api;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.time.ZoneOffset;
|
import java.time.ZoneOffset;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import com.xboe.module.course.entity.Course;
|
|
||||||
import com.xboe.module.course.service.ICourseService;
|
|
||||||
import org.apache.commons.compress.utils.Lists;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@@ -49,15 +42,6 @@ public class StudyCourseESApi extends ApiBaseController{
|
|||||||
@Autowired
|
@Autowired
|
||||||
IStudyCourseService service;
|
IStudyCourseService service;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
ICourseService courseService;
|
|
||||||
|
|
||||||
@Value("${xboe.upload.file.http_path}")
|
|
||||||
private String httpPath;
|
|
||||||
|
|
||||||
@Value("${xboe.image.course.default}")
|
|
||||||
private String defaultCourseImage;
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private PhpOnlineStudyRecordScheduledTasks phpOnlineStudyRecordScheduledTasks;
|
private PhpOnlineStudyRecordScheduledTasks phpOnlineStudyRecordScheduledTasks;
|
||||||
|
|
||||||
@@ -70,9 +54,6 @@ public class StudyCourseESApi extends ApiBaseController{
|
|||||||
try {
|
try {
|
||||||
dto.setAccountId(getCurrent().getAccountId());
|
dto.setAccountId(getCurrent().getAccountId());
|
||||||
PageList<CourseStudyDto> rs=search.search(page.getStartRow(),page.getPageSize(), dto);
|
PageList<CourseStudyDto> rs=search.search(page.getStartRow(),page.getPageSize(), dto);
|
||||||
|
|
||||||
handleCourseImage(rs);
|
|
||||||
|
|
||||||
return success(rs);
|
return success(rs);
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
log.error("查询报名学习ES失败",e);
|
log.error("查询报名学习ES失败",e);
|
||||||
@@ -80,51 +61,6 @@ public class StudyCourseESApi extends ApiBaseController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleCourseImage(PageList<CourseStudyDto> rs) {
|
|
||||||
if (rs == null || CollectionUtil.isEmpty(rs.getList())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<String> emptyImageCourseIds = Lists.newArrayList();
|
|
||||||
for(CourseStudyDto courseStudyDto : rs.getList()) {
|
|
||||||
if(StringUtils.isBlank(courseStudyDto.getCourseImage())) {
|
|
||||||
// 过滤课程类型
|
|
||||||
if(courseStudyDto.getCourseType()==10
|
|
||||||
|| courseStudyDto.getCourseType()==20){
|
|
||||||
emptyImageCourseIds.add(courseStudyDto.getCourseId());
|
|
||||||
}else{
|
|
||||||
log.warn("课程图片为空,课程id为:{},课程类型:{}",courseStudyDto.getCourseId(),courseStudyDto.getCourseType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(CollectionUtil.isEmpty(emptyImageCourseIds)){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Course> courseList = courseService.findByIds(emptyImageCourseIds);
|
|
||||||
if(CollectionUtil.isNotEmpty(courseList)){
|
|
||||||
// courseList转换成map
|
|
||||||
Map<String, Course> courseMap = courseList.stream().collect(Collectors.toMap(Course::getId, course -> course));
|
|
||||||
|
|
||||||
// 赋值ES图片
|
|
||||||
for(CourseStudyDto courseStudyDto : rs.getList()) {
|
|
||||||
if(emptyImageCourseIds.contains(courseStudyDto.getCourseId())) {
|
|
||||||
Course currentCourse = courseMap.get(courseStudyDto.getCourseId());
|
|
||||||
if(null!=currentCourse){
|
|
||||||
if(StringUtils.isNotBlank(currentCourse.getCoverImg())){
|
|
||||||
// 拼接域名
|
|
||||||
courseStudyDto.setCourseImage(httpPath + currentCourse.getCoverImg());
|
|
||||||
}else{
|
|
||||||
// 赋值默认图片
|
|
||||||
courseStudyDto.setCourseImage(defaultCourseImage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping(value="/list-by-ids",method = {RequestMethod.POST})
|
@RequestMapping(value="/list-by-ids",method = {RequestMethod.POST})
|
||||||
public JsonResponse<List<StudyCourse>> search(@RequestBody List<String> ids){
|
public JsonResponse<List<StudyCourse>> search(@RequestBody List<String> ids){
|
||||||
if(ids.isEmpty()) {
|
if(ids.isEmpty()) {
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.xboe.school.study.api;
|
package com.xboe.school.study.api;
|
||||||
|
|
||||||
import com.xboe.api.ThirdApi;
|
|
||||||
import com.xboe.school.study.entity.StudyCourse;
|
|
||||||
import com.xboe.school.study.service.IStudyService;
|
import com.xboe.school.study.service.IStudyService;
|
||||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -12,13 +10,10 @@ import org.springframework.data.redis.core.ScanOptions;
|
|||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.function.BiConsumer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author by lyc
|
* @author by lyc
|
||||||
@@ -31,15 +26,13 @@ public class StudyCourseTask {
|
|||||||
|
|
||||||
private final IStudyService studyService;
|
private final IStudyService studyService;
|
||||||
private final StringRedisTemplate redisTemplate;
|
private final StringRedisTemplate redisTemplate;
|
||||||
@Resource
|
|
||||||
private ThirdApi thirdApi;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时任务
|
* 定时任务
|
||||||
* 获取redis 中学习结束的数据更新入库
|
* 获取redis 中学习结束的数据更新入库
|
||||||
* */
|
* */
|
||||||
@XxlJob("saveStudyCourseItemLastTime2")
|
@XxlJob("saveStudyCourseItemLastTime")
|
||||||
public void saveStudyCourseItemLastTime2() {
|
public void saveStudyCourseItemLastTime() {
|
||||||
// 1. 定义匹配模式(匹配所有目标key)
|
// 1. 定义匹配模式(匹配所有目标key)
|
||||||
final String KEY_PATTERN = "studyContentId:*:last_active";
|
final String KEY_PATTERN = "studyContentId:*:last_active";
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");
|
||||||
@@ -66,6 +59,7 @@ public class StudyCourseTask {
|
|||||||
String[] parts = redisKey.split(":");
|
String[] parts = redisKey.split(":");
|
||||||
if (parts.length < 2) continue;
|
if (parts.length < 2) continue;
|
||||||
String studyContentId = parts[1];
|
String studyContentId = parts[1];
|
||||||
|
|
||||||
// 7. 获取存储的时间点(示例逻辑)
|
// 7. 获取存储的时间点(示例逻辑)
|
||||||
String redisValue = redisTemplate.opsForValue().get(redisKey);
|
String redisValue = redisTemplate.opsForValue().get(redisKey);
|
||||||
if (redisValue == null) continue;
|
if (redisValue == null) continue;
|
||||||
@@ -75,15 +69,19 @@ public class StudyCourseTask {
|
|||||||
if (partValues.length >= 2){
|
if (partValues.length >= 2){
|
||||||
timestamp = LocalDateTime.parse(partValues[1], formatter);
|
timestamp = LocalDateTime.parse(partValues[1], formatter);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 8. 更新数据库(调用已有服务方法)
|
// 8. 更新数据库(调用已有服务方法)
|
||||||
studyService.updateStudyCourseItemLastTime(studyContentId, lastStudyTime, timestamp);
|
studyService.updateStudyCourseItemLastTime(studyContentId, lastStudyTime, timestamp);
|
||||||
|
|
||||||
// 9. 删除Redis键(原子操作)
|
// 9. 删除Redis键(原子操作)
|
||||||
redisTemplate.delete(redisKey);
|
redisTemplate.delete(redisKey);
|
||||||
|
|
||||||
log.info("处理成功 key: {}, lastStudyTime: {}", redisKey, lastStudyTime);
|
log.info("处理成功 key: {}, lastStudyTime: {}", redisKey, lastStudyTime);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("处理失败 key: {}", redisKey, e);
|
log.error("处理失败 key: {}", redisKey, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
cursor.close();
|
cursor.close();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -104,159 +102,5 @@ public class StudyCourseTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@XxlJob("saveStudyCourseItemLastTime")
|
|
||||||
public void saveStudyCourseItemLastTime() {
|
|
||||||
// 1. 定义匹配模式(匹配所有目标key)
|
|
||||||
final String KEY_PATTERN = "studyId:*:courseId:*:courseContentId:*:studyItemId:*";
|
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");
|
|
||||||
// 2. 使用SCAN安全遍历(避免阻塞)
|
|
||||||
ScanOptions options = ScanOptions.scanOptions()
|
|
||||||
.match(KEY_PATTERN)
|
|
||||||
.count(100) // 分页大小
|
|
||||||
.build();
|
|
||||||
|
|
||||||
try (RedisConnection connection = Objects.requireNonNull(redisTemplate.getConnectionFactory()).getConnection()) {
|
|
||||||
Cursor<byte[]> cursor = connection.scan(options);
|
|
||||||
// 3. 遍历处理符合条件的key
|
|
||||||
while (cursor.hasNext()) {
|
|
||||||
String redisKey = new String(cursor.next());
|
|
||||||
log.info("-定时任务 saveStudyCourseItemLastTime ---redisKey = " + redisKey);
|
|
||||||
// 4. 获取剩余TTL(秒)
|
|
||||||
Long ttl = redisTemplate.getExpire(redisKey, TimeUnit.SECONDS);
|
|
||||||
|
|
||||||
// 5. 过滤条件:剩余时间 >= 29天23小时30分钟(转换为秒)
|
|
||||||
// 总需时间 = (30天 - 30分钟) = 29天23小时30分钟 = 2590200秒
|
|
||||||
// 5分钟 300秒 || 2592000 - 300 = 2591700
|
|
||||||
if (ttl <= 2590200) {
|
|
||||||
try {
|
|
||||||
// 6. 提取studyContentId
|
|
||||||
String[] parts = redisKey.split(":");
|
|
||||||
if (parts.length < 7) continue;
|
|
||||||
String studyId = parts[1];
|
|
||||||
String courseId = parts[3];
|
|
||||||
String courseContentId = parts[5];
|
|
||||||
String studyItemId = parts[7];
|
|
||||||
// 7. 获取存储的时间点(示例逻辑)
|
|
||||||
String redisValue = redisTemplate.opsForValue().get(redisKey);
|
|
||||||
log.info("-定时任务 saveStudyCourseItemLastTime ---redisValue = " + redisValue);
|
|
||||||
if (redisValue == null) continue;
|
|
||||||
String[] partValues = redisValue.split("&");
|
|
||||||
int studyVideoTtime = Integer.parseInt(partValues[0]);
|
|
||||||
int appendtime = Integer.parseInt(partValues[1]);
|
|
||||||
LocalDateTime timestamp = null;
|
|
||||||
if (partValues.length >= 2){
|
|
||||||
timestamp = LocalDateTime.parse(partValues[2], formatter);
|
|
||||||
}
|
|
||||||
// 8. 更新数据库(调用已有服务方法)
|
|
||||||
studyService.newAppendStudyDuration(studyId,null,courseContentId,appendtime,timestamp);
|
|
||||||
log.info("-定时任务 saveStudyCourseItemLastTime ---studyItemId = " + studyItemId);
|
|
||||||
if (studyItemId != null && !studyItemId.equals("null")){
|
|
||||||
log.info("-定时任务 saveStudyCourseItemLastTime --- boolean studyItemId = " + (studyItemId != null));
|
|
||||||
// 8. 更新数据库(调用已有服务方法)
|
|
||||||
studyService.updateStudyCourseItemLastTime(studyItemId, studyVideoTtime, timestamp);
|
|
||||||
}
|
|
||||||
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(studyId , courseId, null);
|
|
||||||
log.info("处理成功 allUserList: {}", allUserList);
|
|
||||||
// 9. 删除Redis键(原子操作)
|
|
||||||
redisTemplate.delete(redisKey);
|
|
||||||
log.info("处理成功 key: {}, lastStudyTime: {}", redisKey, appendtime);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("处理失败 key: {}", redisKey, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cursor.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("定时任务执行异常", e);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@XxlJob("saveStudyCourseItemLastTime1")
|
|
||||||
public void saveStudyCourseItemLastTime1() {
|
|
||||||
// 定义需要处理的键模式集合
|
|
||||||
processKeys("studyContentId:*:last_active", this::handleLastActiveKey);
|
|
||||||
processKeys("studyId:*:courseId:*:courseContentId:*", this::handleDurationKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void processKeys(String keyPattern, BiConsumer<String, String> keyHandler) {
|
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");
|
|
||||||
ScanOptions options = ScanOptions.scanOptions()
|
|
||||||
.match(keyPattern)
|
|
||||||
.count(100)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
try (RedisConnection connection = Objects.requireNonNull(redisTemplate.getConnectionFactory()).getConnection()) {
|
|
||||||
Cursor<byte[]> cursor = connection.scan(options);
|
|
||||||
while (cursor.hasNext()) {
|
|
||||||
String redisKey = new String(cursor.next());
|
|
||||||
Long ttl = redisTemplate.getExpire(redisKey, TimeUnit.SECONDS);
|
|
||||||
|
|
||||||
if (ttl != null && ttl <= 2590200) {
|
|
||||||
try {
|
|
||||||
String redisValue = redisTemplate.opsForValue().get(redisKey);
|
|
||||||
if (redisValue != null) {
|
|
||||||
// 调用对应的处理方法
|
|
||||||
keyHandler.accept(redisKey, redisValue);
|
|
||||||
}
|
|
||||||
redisTemplate.delete(redisKey);
|
|
||||||
log.info("Key processed: {}", redisKey);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("Process failed [{}]", redisKey, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cursor.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("Key processing error: {}", keyPattern, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 处理 last_active 类型键
|
|
||||||
private void handleLastActiveKey(String redisKey, String redisValue) {
|
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");
|
|
||||||
String[] parts = redisKey.split(":");
|
|
||||||
String studyContentId = parts[1];
|
|
||||||
|
|
||||||
String[] values = redisValue.split("&");
|
|
||||||
int lastStudyTime = Integer.parseInt(values[0]);
|
|
||||||
LocalDateTime timestamp = values.length >= 2 ?
|
|
||||||
LocalDateTime.parse(values[1], formatter) : null;
|
|
||||||
|
|
||||||
studyService.updateStudyCourseItemLastTime(studyContentId, lastStudyTime, timestamp);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 处理 duration 类型键
|
|
||||||
private void handleDurationKey(String redisKey, String redisValue) {
|
|
||||||
String[] parts = redisKey.split(":");
|
|
||||||
String studyId = parts[1];
|
|
||||||
String courseId = parts[3];
|
|
||||||
String courseContentId = parts[5];
|
|
||||||
|
|
||||||
String[] values = redisValue.split("&");
|
|
||||||
int duration = Integer.parseInt(values[0]);
|
|
||||||
LocalDateTime timestamp = values.length >= 2 ?
|
|
||||||
LocalDateTime.parse(values[1], DateTimeFormatter.ISO_LOCAL_DATE_TIME) : null;
|
|
||||||
|
|
||||||
studyService.newAppendStudyDuration(studyId, null, courseContentId, duration, timestamp);
|
|
||||||
|
|
||||||
// 保留第三方调用
|
|
||||||
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(studyId, courseId, null);
|
|
||||||
log.info("Study records synced: {}", allUserList.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,6 @@ public class StudyCourseItem extends IdEntity {
|
|||||||
/**
|
/**
|
||||||
* 视频播放进度
|
* 视频播放进度
|
||||||
* */
|
* */
|
||||||
// @Column(name = "progress_video")
|
|
||||||
@Transient
|
@Transient
|
||||||
private BigDecimal progressVideo;
|
private BigDecimal progressVideo;
|
||||||
|
|
||||||
|
|||||||
@@ -101,8 +101,4 @@ public interface IStudyService {
|
|||||||
List<StudyCourseItem> getList(String courseId, String contentId, String name, Integer status);
|
List<StudyCourseItem> getList(String courseId, String contentId, String name, Integer status);
|
||||||
|
|
||||||
void updateStudyCourseItemLastTime(String studyContentId, int lastStudyTime, LocalDateTime timestamp);
|
void updateStudyCourseItemLastTime(String studyContentId, int lastStudyTime, LocalDateTime timestamp);
|
||||||
|
|
||||||
void updateStudyDuration(String studyId,String studyItemId, String contentId, Integer videoTime,String courseId);
|
|
||||||
|
|
||||||
void newAppendStudyDuration(String studyId, String studyItemId, String courseContentId, int duration, LocalDateTime timestamp);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import com.xboe.module.course.entity.CourseExam;
|
|||||||
import com.xboe.school.study.dao.StudyCourseDao;
|
import com.xboe.school.study.dao.StudyCourseDao;
|
||||||
import com.xboe.school.study.dao.StudyCourseItemDao;
|
import com.xboe.school.study.dao.StudyCourseItemDao;
|
||||||
import com.xboe.school.study.dao.StudyExamDao;
|
import com.xboe.school.study.dao.StudyExamDao;
|
||||||
import com.xboe.school.study.entity.StudyCourse;
|
|
||||||
import com.xboe.school.study.entity.StudyCourseItem;
|
import com.xboe.school.study.entity.StudyCourseItem;
|
||||||
import com.xboe.school.study.entity.StudyExam;
|
import com.xboe.school.study.entity.StudyExam;
|
||||||
import com.xboe.school.study.service.IStudyExamService;
|
import com.xboe.school.study.service.IStudyExamService;
|
||||||
@@ -171,32 +170,15 @@ public class StudyExamServiceImpl implements IStudyExamService{
|
|||||||
}
|
}
|
||||||
builder.addGroupBy("studyId");
|
builder.addGroupBy("studyId");
|
||||||
List<StudyExam> list1 = dao.findList(builder.builder());
|
List<StudyExam> list1 = dao.findList(builder.builder());
|
||||||
if(list1 != null && list1.size() > 0){
|
log.info("------------QueryBuilder list1.size = " + list1.size() + ",0 = " + list1.get(0));
|
||||||
log.info("----------StudyExam--QueryBuilder list1.size = " + list1.size() + ",0 = " + list1.get(0));
|
|
||||||
for(StudyExam item : list1){
|
|
||||||
log.info("--------------StudyExam---CourseId = " + item.getCourseId() + " , StudyId = " + item.getStudyId() + " , StudentId = " + item.getStudentId());
|
|
||||||
int totalContent = courseContentDao.getCount(item.getCourseId());
|
|
||||||
log.info("--------StudyExam--准备判断进度-------totalContent = " + totalContent);
|
|
||||||
scDao.finishCheck1(item.getStudyId(),item.getCourseId(),totalContent);
|
|
||||||
log.info("--------StudyExam--判断进度完毕----------------------");
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
QueryBuilder builder1 = QueryBuilder.from(StudyCourse.class);
|
|
||||||
if (StringUtils.isEmpty(courseId)){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
builder1.addFilter(FieldFilters.eq("courseId", courseId));
|
|
||||||
List<StudyCourse> list2 = scDao.findList(builder1.builder());
|
|
||||||
log.info("------------StudyCourse list2.size = " + list2.size() + ",0 = " + list2.get(0));
|
|
||||||
for(StudyCourse item : list2){
|
|
||||||
log.info("-------------StudyCourse----CourseId = " + item.getCourseId() + " , StudyId = " + item.getId() + " , StudentId = " + item.getAid());
|
|
||||||
int totalContent = courseContentDao.getCount(item.getCourseId());
|
|
||||||
log.info("--------StudyCourse--准备判断进度-------totalContent = " + totalContent);
|
|
||||||
scDao.finishCheck1(item.getId(),item.getCourseId(),totalContent);
|
|
||||||
log.info("--------StudyCourse--判断进度完毕----------------------");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
for(StudyExam item : list1){
|
||||||
|
log.info("-----------------CourseId = " + item.getCourseId() + " , StudyId = " + item.getStudyId() + " , StudentId = " + item.getStudentId());
|
||||||
|
int totalContent = courseContentDao.getCount(item.getCourseId());
|
||||||
|
log.info("----------准备判断进度-------totalContent = " + totalContent);
|
||||||
|
scDao.finishCheck1(item.getStudyId(),item.getCourseId(),totalContent);
|
||||||
|
log.info("----------判断进度完毕----------------------");
|
||||||
|
}
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
exception.printStackTrace();
|
exception.printStackTrace();
|
||||||
log.info("------异常----------------------:" +exception.getMessage());
|
log.info("------异常----------------------:" +exception.getMessage());
|
||||||
|
|||||||
@@ -116,74 +116,34 @@ public class StudyServiceImpl implements IStudyService{
|
|||||||
//增加内容的学习时长
|
//增加内容的学习时长
|
||||||
if(StringUtils.isNotBlank(studyItemId)) {
|
if(StringUtils.isNotBlank(studyItemId)) {
|
||||||
//直接根据id更新
|
//直接根据id更新
|
||||||
|
// String hql="Update StudyCourseItem set studyDuration=studyDuration+"+duration+",status=(case when status<2 then 2 else status end) where id=?1";
|
||||||
|
// scItemDao.update(hql,studyItemId);
|
||||||
String sql="Update boe_study_course_item set study_duration=study_duration+"+duration+",status=(case when status<2 then 2 else status end) where id=?1";
|
String sql="Update boe_study_course_item set study_duration=study_duration+"+duration+",status=(case when status<2 then 2 else status end) where id=?1";
|
||||||
scItemDao.sqlUpdate(sql,studyItemId);
|
scItemDao.sqlUpdate(sql,studyItemId);
|
||||||
|
//scItemDao.updateMultiFieldById(studyItemId, UpdateBuilder.create("studyDuration", "studyDuration+"+duration,FieldUpdateType.EXPRESSION));
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
|
//根据学习id和课程内容id更新
|
||||||
|
// scItemDao.update(UpdateBuilder.from(StudyCourseItem.class)
|
||||||
|
// .addUpdateField("studyDuration", "studyDuration+"+duration,FieldUpdateType.EXPRESSION)
|
||||||
|
// .addFilter(FieldFilters.eq("studyId", studyId))
|
||||||
|
// .addFilter(FieldFilters.eq("contentId", courseContentId))
|
||||||
|
// .builder());
|
||||||
|
//
|
||||||
|
// String hql="Update StudyCourseItem set studyDuration=studyDuration+"+duration+",status=(case when status<2 then 2 else status end) where studyId=?1 and contentId=?2";
|
||||||
|
// scItemDao.update(hql,studyId,courseContentId);
|
||||||
String sql="Update boe_study_course_item set study_duration=study_duration+"+duration+",status=(case when status<2 then 2 else status end) where study_id=?1 and content_id=?2";
|
String sql="Update boe_study_course_item set study_duration=study_duration+"+duration+",status=(case when status<2 then 2 else status end) where study_id=?1 and content_id=?2";
|
||||||
scItemDao.sqlUpdate(sql,studyId,courseContentId);
|
scItemDao.sqlUpdate(sql,studyId,courseContentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//追加课程的学习时长
|
||||||
|
//scDao.updateMultiFieldById(studyId, UpdateBuilder.create("totalDuration", "totalDuration+"+duration,FieldUpdateType.EXPRESSION));
|
||||||
|
|
||||||
String sql="Update boe_study_course set total_duration=total_duration+"+duration+",status=(case when status<2 then 2 else status end),progress=(case when progress=0 then 1 else progress end),last_time = '"+LocalDateTime.now()+"' where id=?1";
|
String sql="Update boe_study_course set total_duration=total_duration+"+duration+",status=(case when status<2 then 2 else status end),progress=(case when progress=0 then 1 else progress end),last_time = '"+LocalDateTime.now()+"' where id=?1";
|
||||||
scDao.sqlUpdate(sql,studyId);
|
scDao.sqlUpdate(sql,studyId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional
|
|
||||||
public void newAppendStudyDuration(String studyId,String studyItemId,String courseContentId, int duration,LocalDateTime timestamp) {
|
|
||||||
|
|
||||||
//增加内容的学习时长
|
|
||||||
if(StringUtils.isNotBlank(studyItemId)) {
|
|
||||||
//直接根据id更新
|
|
||||||
String sql="Update boe_study_course_item set study_duration=study_duration+"+duration+",status=(case when status<2 then 2 else status end) where id=?1";
|
|
||||||
scItemDao.sqlUpdate(sql,studyItemId);
|
|
||||||
|
|
||||||
}else {
|
|
||||||
String sql="Update boe_study_course_item set study_duration=study_duration+"+duration+",status=(case when status<2 then 2 else status end) where study_id=?1 and content_id=?2";
|
|
||||||
scItemDao.sqlUpdate(sql,studyId,courseContentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
String sql="Update boe_study_course set total_duration=total_duration+"+duration+",status=(case when status<2 then 2 else status end),progress=(case when progress=0 then 1 else progress end),last_time = '"+timestamp+"' where id=?1";
|
|
||||||
scDao.sqlUpdate(sql,studyId);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新 前端传输已学习时长
|
|
||||||
@Override
|
|
||||||
public void updateStudyDuration(String studyId,String studyItemId,String courseContentId, Integer videoTime,String courseId) {
|
|
||||||
|
|
||||||
LocalDateTime now = LocalDateTime.now();
|
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");
|
|
||||||
|
|
||||||
String key = "studyId:" + studyId + ":courseId:" + courseId + ":courseContentId:" + courseContentId + ":studyItemId:" + studyItemId;
|
|
||||||
String currentValue = redisTemplate.opsForValue().get(key);
|
|
||||||
Integer lastDuration = 0;
|
|
||||||
Integer oldVideoTime = 0;
|
|
||||||
Integer sum = 10; // 原appendtime改为固定10秒调用一次接口
|
|
||||||
if (currentValue != null) {
|
|
||||||
String[] partValues = currentValue.split("&");
|
|
||||||
oldVideoTime = Integer.parseInt(partValues[0]);
|
|
||||||
lastDuration = Integer.parseInt(partValues[1]);
|
|
||||||
sum += lastDuration;
|
|
||||||
if(oldVideoTime > videoTime){
|
|
||||||
videoTime = oldVideoTime;// 取最大值最终入库
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
String value = videoTime + "&" + sum + "&" + now.format(formatter); // study_video_time & appendtime & time
|
|
||||||
log.info("-study-video-time-----value = " + value);
|
|
||||||
|
|
||||||
// 20250303 优化 多次更新改一次更新
|
|
||||||
// 更新Redis中的最后活跃时间(带30秒过期)
|
|
||||||
redisTemplate.opsForValue().set(
|
|
||||||
key,
|
|
||||||
value,
|
|
||||||
Duration.ofSeconds(2592000)
|
|
||||||
);
|
|
||||||
log.info("- 合并 updateStudyDuration -redis保存---value = " + value);
|
|
||||||
// Duration.ofDays(30) 也就是 2592000秒
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void appendStudyDuration(StudyTime st) {
|
public void appendStudyDuration(StudyTime st) {
|
||||||
@@ -206,21 +166,7 @@ public class StudyServiceImpl implements IStudyService{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<StudyCourseItem> findByStudyId(String studyId) {
|
public List<StudyCourseItem> findByStudyId(String studyId) {
|
||||||
List<StudyCourseItem> list = scItemDao.findList(OrderCondition.desc("lastTime"),FieldFilters.eq("studyId", studyId));
|
return scItemDao.findList(OrderCondition.desc("lastTime"),FieldFilters.eq("studyId", studyId));
|
||||||
for (StudyCourseItem item : list){
|
|
||||||
log.info("-- studyIndex -查询上次学习的是什么资源。mysql查询---------------- item = " + item);
|
|
||||||
String redisKey = "studyId:" + studyId + ":courseId:" + item.getCourseId() + ":courseContentId:" + item.getContentId() + ":studyItemId:" + item.getId();
|
|
||||||
log.info("-- studyIndex -查询上次学习的是什么资源。查询用户的学习情况---------------- redisKey = " + redisKey);
|
|
||||||
String redisValue = redisTemplate.opsForValue().get(redisKey);
|
|
||||||
log.info("-- studyIndex -查询上次学习的是什么资源。查询用户的学习情况---------------- redisValue = " + redisValue);
|
|
||||||
if (redisValue != null) {
|
|
||||||
String[] values = redisValue.split("&");
|
|
||||||
int duration = Integer.parseInt(values[0]);
|
|
||||||
item.setLastStudyTime(duration);
|
|
||||||
log.info("-- studyIndex -----set 结果---------------- LastStudyTime = " + item.getLastStudyTime());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -282,12 +228,11 @@ public class StudyServiceImpl implements IStudyService{
|
|||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String sql = "select a.id, a.course_id, a.course_name, a.aname, " +
|
String sql = "select a.id, a.course_id, a.course_name, a.aname, " +
|
||||||
"IFNULL(b.finish_time, '0') as finish_time, IFNULL(b.progress, 0) as progress, IFNULL(b.status, 1) as status,b.score " +
|
"IFNULL(b.finish_time, '0') as finish_time, IFNULL(b.progress, 0) as progress, IFNULL(b.status, 1) as status " +
|
||||||
"from (select id, course_id, course_name, aname, 0, 1 from boe_study_course where course_id = '" + courseId + "' and aname like '%"+name+"%') a " +
|
"from (select id, course_id, course_name, aname, 0, 1 from boe_study_course where course_id = '" + courseId + "' and aname like '%"+name+"%') a " +
|
||||||
"left join " +
|
"left join " +
|
||||||
"(select bsc.id, bsc.course_id, bsc.course_name, bsc.aname, item.finish_time, item.progress, item.status,MAX(item.score) score " +
|
"(select bsc.id, bsc.course_id, bsc.course_name, bsc.aname, item.finish_time, item.progress, item.status " +
|
||||||
"from boe_study_course bsc left join boe_study_course_item item on item.course_id = bsc.course_id and item.study_id = bsc.id " +
|
"from boe_study_course bsc left join boe_study_course_item item on item.course_id = bsc.course_id and item.study_id = bsc.id " +
|
||||||
"where bsc.course_id = '" + courseId + "' and item.content_id = '" + contentId + "' and item.aname like '%"+name+"%' group by bsc.id) b " +
|
"where bsc.course_id = '" + courseId + "' and item.content_id = '" + contentId + "' and item.aname like '%"+name+"%' group by bsc.id) b " +
|
||||||
"on a.course_id = b.course_id and a.id = b.id " +
|
"on a.course_id = b.course_id and a.id = b.id " +
|
||||||
@@ -316,9 +261,6 @@ public class StudyServiceImpl implements IStudyService{
|
|||||||
sc.setProgress(Integer.valueOf(objs[5].toString()));
|
sc.setProgress(Integer.valueOf(objs[5].toString()));
|
||||||
sc.setStatus(Integer.valueOf(objs[6].toString()));
|
sc.setStatus(Integer.valueOf(objs[6].toString()));
|
||||||
sc.setAname(objs[3].toString());
|
sc.setAname(objs[3].toString());
|
||||||
if(objs[7] != null){
|
|
||||||
sc.setScore(Float.valueOf(objs[7].toString()));
|
|
||||||
}
|
|
||||||
item.add(sc);
|
item.add(sc);
|
||||||
}
|
}
|
||||||
log.info("资源完成情况人员"+item);
|
log.info("资源完成情况人员"+item);
|
||||||
@@ -415,7 +357,6 @@ public class StudyServiceImpl implements IStudyService{
|
|||||||
log.info("-study-video-time-mysql保存---studyContentId = " + studyContentId);
|
log.info("-study-video-time-mysql保存---studyContentId = " + studyContentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String,Object> getLast(String aid) {
|
public Map<String,Object> getLast(String aid) {
|
||||||
//按lastTime排序,第一条,只是课件内容
|
//按lastTime排序,第一条,只是课件内容
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.xboe.school.vo;
|
|
||||||
|
|
||||||
import com.xboe.school.study.entity.StudyTime;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/** appendtime 于 study-video-time 合并
|
|
||||||
* appendtime 参数 StudyTime
|
|
||||||
* study-video-time 参数 是 StudyTimeVo
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class StudyTimeVo extends StudyTime {
|
|
||||||
|
|
||||||
private String itemId;
|
|
||||||
private Integer videoTime;
|
|
||||||
// private String contentId; // 已继承
|
|
||||||
// private String courseId; // 已继承
|
|
||||||
private Float progressVideo;
|
|
||||||
private Integer type; // 0 study-video-time , 1 appendtime
|
|
||||||
}
|
|
||||||
@@ -76,9 +76,6 @@ xboe:
|
|||||||
encryptor:
|
encryptor:
|
||||||
algorithm: PBEWithMD5AndDES
|
algorithm: PBEWithMD5AndDES
|
||||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
||||||
image:
|
|
||||||
course:
|
|
||||||
default: http://192.168.0.253/pc/images/bgimg/course.png
|
|
||||||
xxl:
|
xxl:
|
||||||
job:
|
job:
|
||||||
accessToken: 65ddc683-22f5-83b4-de3a-3c97a0a29af0
|
accessToken: 65ddc683-22f5-83b4-de3a-3c97a0a29af0
|
||||||
|
|||||||
@@ -108,9 +108,7 @@ xboe:
|
|||||||
from: boeu_learning@boe.com.cn
|
from: boeu_learning@boe.com.cn
|
||||||
user:
|
user:
|
||||||
security:
|
security:
|
||||||
image:
|
|
||||||
course:
|
|
||||||
default: http://10.251.132.75/pc/images/bgimg/course.png
|
|
||||||
jasypt:
|
jasypt:
|
||||||
encryptor:
|
encryptor:
|
||||||
algorithm: PBEWithMD5AndDES
|
algorithm: PBEWithMD5AndDES
|
||||||
|
|||||||
@@ -74,9 +74,6 @@ xboe:
|
|||||||
encryptor:
|
encryptor:
|
||||||
algorithm: PBEWithMD5AndDES
|
algorithm: PBEWithMD5AndDES
|
||||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
||||||
image:
|
|
||||||
course:
|
|
||||||
default: https://u.boe.com/pc/images/bgimg/course.png
|
|
||||||
xxl:
|
xxl:
|
||||||
job:
|
job:
|
||||||
accessToken: 65ddc683-22f5-83b4-de3a-3c97a0a29af0
|
accessToken: 65ddc683-22f5-83b4-de3a-3c97a0a29af0
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ xboe:
|
|||||||
file:
|
file:
|
||||||
temp_path: /tmp
|
temp_path: /tmp
|
||||||
save_path: /home/www/elearning/upload
|
save_path: /home/www/elearning/upload
|
||||||
http_path: https://u-pre.boe.com/upload
|
http_path: http://10.251.186.27/upload
|
||||||
externalinterface:
|
externalinterface:
|
||||||
url:
|
url:
|
||||||
system: http://localhost:9091
|
system: http://localhost:9091
|
||||||
@@ -108,9 +108,7 @@ xboe:
|
|||||||
from: boeu_learning@boe.com.cn
|
from: boeu_learning@boe.com.cn
|
||||||
user:
|
user:
|
||||||
security:
|
security:
|
||||||
image:
|
|
||||||
course:
|
|
||||||
default: https://u-pre.boe.com/pc/images/bgimg/course.png
|
|
||||||
jasypt:
|
jasypt:
|
||||||
encryptor:
|
encryptor:
|
||||||
algorithm: PBEWithMD5AndDES
|
algorithm: PBEWithMD5AndDES
|
||||||
@@ -119,10 +117,6 @@ jasypt:
|
|||||||
boe:
|
boe:
|
||||||
domain: http://10.251.186.27
|
domain: http://10.251.186.27
|
||||||
|
|
||||||
kjb:
|
|
||||||
aicoreUrl: http://10.251.186.27:8088
|
|
||||||
videoUrlPrefix: https://u-pre.boe.com/upload
|
|
||||||
|
|
||||||
ok:
|
ok:
|
||||||
http:
|
http:
|
||||||
connect-timeout: 30
|
connect-timeout: 30
|
||||||
|
|||||||
@@ -74,4 +74,3 @@ coursesuilt:
|
|||||||
syncCourseStudent: ${boe.domain}/manageApi/admin/teacherRecord/syncCourseStudent
|
syncCourseStudent: ${boe.domain}/manageApi/admin/teacherRecord/syncCourseStudent
|
||||||
syncOnLineScore: ${boe.domain}/manageApi/admin/teacherRecord/syncOnLineScore
|
syncOnLineScore: ${boe.domain}/manageApi/admin/teacherRecord/syncOnLineScore
|
||||||
updateOnLineStatua: ${boe.domain}/manageApi/admin/teacherRecord/updateOnLineStatua
|
updateOnLineStatua: ${boe.domain}/manageApi/admin/teacherRecord/updateOnLineStatua
|
||||||
delOnLineById: ${boe.domain}/manageApi/admin/teacherRecord/delOnLineById
|
|
||||||
Reference in New Issue
Block a user