修改测试查询参数

This commit is contained in:
zhaolongfei
2024-05-25 19:05:35 +08:00
parent 3aa737ae15
commit 73c2e8b54a
4 changed files with 17 additions and 11 deletions

View File

@@ -194,10 +194,10 @@ public class ThirdApi {
Opt.ofBlankAble(resp).map(t -> JSONUtil.toBean(t, DynamicBean.class).success()).map(DynamicBean::getResult).map(UserDynamicResult::getList).stream().flatMap(Collection::stream).forEach(list::add);
}
public List<StudyCourse>getStudyCourseList(String studyId,String contentId, String token){
public List<StudyCourse>getStudyCourseList(String studyId,String courseId, String token){
StudyCourseVo studyCourseVo = new StudyCourseVo();
studyCourseVo.setStudyId(studyId);
studyCourseVo.setContentId(contentId);
studyCourseVo.setCourseId(courseId);
String resp = Optional.ofNullable(
HttpRequest.post(getStudyStatus).body(JSONUtil.toJsonStr(studyCourseVo)).header("token", token).execute()
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));

View File

@@ -10,7 +10,7 @@ public class StudyCourseVo {
private Long userId;
private String studyId;
private Long courseId;
private String courseId;
private String contentId;
public Long getUserId() {
@@ -29,11 +29,11 @@ public class StudyCourseVo {
this.studyId = studyId;
}
public Long getCourseId() {
public String getCourseId() {
return courseId;
}
public void setCourseId(Long courseId) {
public void setCourseId(String courseId) {
this.courseId = courseId;
}

View File

@@ -328,7 +328,7 @@ public class StudyCourseApi extends ApiBaseController{
if(item.getProgress()<100 && sci.getProgress()>item.getProgress()) {
studyService.updateProcess(item.getId(), sci.getStudyId(), sci.getCourseId(), sci.getContentTotal(), sci.getProgress());
}
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(sci.getStudyId(), sci.getContentId(), token);
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(sci.getStudyId(), sci.getCourseId(), token);
log.info("在线课学习记录"+allUserList);
System.out.println("在线课学习记录"+allUserList);
//追加学习时长
@@ -349,7 +349,7 @@ public class StudyCourseApi extends ApiBaseController{
sci.setAname(cuser.getName());
studyService.saveStudyInfo(sci);
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(sci.getStudyId(), sci.getContentId(), token);
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(sci.getStudyId(), sci.getCourseId(), token);
log.info("在线课学习记录"+allUserList);
System.out.println("在线课学习记录"+allUserList);
//学习记录成功后处理
@@ -491,7 +491,7 @@ public class StudyCourseApi extends ApiBaseController{
* @return
*/
@PostMapping("/study-video-finish")
public JsonResponse<Boolean> studyVideoFinish(String itemId,String studyId,String courseId,Integer cnum){
public JsonResponse<Boolean> studyVideoFinish(String itemId,String studyId,String courseId,Integer cnum, HttpServletRequest request){
if(StringUtils.isBlank(itemId)){
return error("参数错误");
}
@@ -501,8 +501,14 @@ public class StudyCourseApi extends ApiBaseController{
if(StringUtils.isBlank(courseId)){
return error("课程参数错误");
}
String token = request.getHeader("Xboe-Access-Token");
if (StringUtils.isEmpty(token)) {
token = request.getHeader("token");
}
try {
studyService.finishVideoStudyItem(itemId, studyId,courseId,cnum);
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(studyId, courseId, token);
log.info("在线课学习记录"+allUserList);
return success(true);
}catch(Exception e) {
log.error("记录内容学习完成错误",e);

View File

@@ -56,8 +56,8 @@ logging.config=classpath:log/logback-@profileActive@.xml
# config.id.generator.datacenter.num=1
#boe.domain=https://pretest.zcwytd.com
#boe.domain=https://u.boe.com
boe.domain=http://localhost:30001
boe.domain=https://u.boe.com
#boe.domain=http://localhost:30001
orgTree.orgTreeList=${boe.domain}/userbasic/org/list
# ????id????????????
orgTree.orgChildTreeList=${boe.domain}/userbasic/org/childOrgs
@@ -73,4 +73,4 @@ infrasApi.dict=${boe.domain}/infrasApi/dict/list
manageApi.stu.offcourse=${boe.domain}/manageApi/stu/offcourse/getOffCourseId
#获取离职教师id
userBasic.getTeacherIds=${boe.domain}/userbasic/user/getTeacherInfo
coursesuilt.getStudyStatus=${boe.domain}/stu/project/completeStatus
coursesuilt.getStudyStatus=${boe.domain}/manageApi/stu/project/completeStatus