mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-13 12:56:48 +08:00
修改测试查询参数
This commit is contained in:
@@ -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);
|
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 studyCourseVo = new StudyCourseVo();
|
||||||
studyCourseVo.setStudyId(studyId);
|
studyCourseVo.setStudyId(studyId);
|
||||||
studyCourseVo.setContentId(contentId);
|
studyCourseVo.setCourseId(courseId);
|
||||||
String resp = Optional.ofNullable(
|
String resp = Optional.ofNullable(
|
||||||
HttpRequest.post(getStudyStatus).body(JSONUtil.toJsonStr(studyCourseVo)).header("token", token).execute()
|
HttpRequest.post(getStudyStatus).body(JSONUtil.toJsonStr(studyCourseVo)).header("token", token).execute()
|
||||||
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public class StudyCourseVo {
|
|||||||
|
|
||||||
private Long userId;
|
private Long userId;
|
||||||
private String studyId;
|
private String studyId;
|
||||||
private Long courseId;
|
private String courseId;
|
||||||
private String contentId;
|
private String contentId;
|
||||||
|
|
||||||
public Long getUserId() {
|
public Long getUserId() {
|
||||||
@@ -29,11 +29,11 @@ public class StudyCourseVo {
|
|||||||
this.studyId = studyId;
|
this.studyId = studyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getCourseId() {
|
public String getCourseId() {
|
||||||
return courseId;
|
return courseId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCourseId(Long courseId) {
|
public void setCourseId(String courseId) {
|
||||||
this.courseId = courseId;
|
this.courseId = courseId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
if(item.getProgress()<100 && sci.getProgress()>item.getProgress()) {
|
if(item.getProgress()<100 && sci.getProgress()>item.getProgress()) {
|
||||||
studyService.updateProcess(item.getId(), sci.getStudyId(), sci.getCourseId(), sci.getContentTotal(), sci.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);
|
log.info("在线课学习记录"+allUserList);
|
||||||
System.out.println("在线课学习记录"+allUserList);
|
System.out.println("在线课学习记录"+allUserList);
|
||||||
//追加学习时长
|
//追加学习时长
|
||||||
@@ -349,7 +349,7 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
sci.setAname(cuser.getName());
|
sci.setAname(cuser.getName());
|
||||||
|
|
||||||
studyService.saveStudyInfo(sci);
|
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);
|
log.info("在线课学习记录"+allUserList);
|
||||||
System.out.println("在线课学习记录"+allUserList);
|
System.out.println("在线课学习记录"+allUserList);
|
||||||
//学习记录成功后处理
|
//学习记录成功后处理
|
||||||
@@ -491,7 +491,7 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/study-video-finish")
|
@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)){
|
if(StringUtils.isBlank(itemId)){
|
||||||
return error("参数错误");
|
return error("参数错误");
|
||||||
}
|
}
|
||||||
@@ -501,8 +501,14 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
if(StringUtils.isBlank(courseId)){
|
if(StringUtils.isBlank(courseId)){
|
||||||
return error("课程参数错误");
|
return error("课程参数错误");
|
||||||
}
|
}
|
||||||
|
String token = request.getHeader("Xboe-Access-Token");
|
||||||
|
if (StringUtils.isEmpty(token)) {
|
||||||
|
token = request.getHeader("token");
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
studyService.finishVideoStudyItem(itemId, studyId,courseId,cnum);
|
studyService.finishVideoStudyItem(itemId, studyId,courseId,cnum);
|
||||||
|
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(studyId, courseId, token);
|
||||||
|
log.info("在线课学习记录"+allUserList);
|
||||||
return success(true);
|
return success(true);
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
log.error("记录内容学习完成错误",e);
|
log.error("记录内容学习完成错误",e);
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ logging.config=classpath:log/logback-@profileActive@.xml
|
|||||||
# config.id.generator.datacenter.num=1
|
# config.id.generator.datacenter.num=1
|
||||||
|
|
||||||
#boe.domain=https://pretest.zcwytd.com
|
#boe.domain=https://pretest.zcwytd.com
|
||||||
#boe.domain=https://u.boe.com
|
boe.domain=https://u.boe.com
|
||||||
boe.domain=http://localhost:30001
|
#boe.domain=http://localhost:30001
|
||||||
orgTree.orgTreeList=${boe.domain}/userbasic/org/list
|
orgTree.orgTreeList=${boe.domain}/userbasic/org/list
|
||||||
# ????id????????????
|
# ????id????????????
|
||||||
orgTree.orgChildTreeList=${boe.domain}/userbasic/org/childOrgs
|
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
|
manageApi.stu.offcourse=${boe.domain}/manageApi/stu/offcourse/getOffCourseId
|
||||||
#获取离职教师id
|
#获取离职教师id
|
||||||
userBasic.getTeacherIds=${boe.domain}/userbasic/user/getTeacherInfo
|
userBasic.getTeacherIds=${boe.domain}/userbasic/user/getTeacherInfo
|
||||||
coursesuilt.getStudyStatus=${boe.domain}/stu/project/completeStatus
|
coursesuilt.getStudyStatus=${boe.domain}/manageApi/stu/project/completeStatus
|
||||||
Reference in New Issue
Block a user