在线删除同步授课记录

This commit is contained in:
670788339
2025-04-29 15:58:37 +08:00
parent 4fff780970
commit 5836b147c4
3 changed files with 18 additions and 3 deletions

View File

@@ -98,7 +98,8 @@ public class ThirdApi {
private String syncOnLineScore;
@Value("${coursesuilt.updateOnLineStatua}")
private String updateOnLineStatua;
@Value("${coursesuilt.delOnLineById}")
private String delOnLineById;
//获取例外人员的id
public List<String> getUserId() {
@@ -398,4 +399,12 @@ public class ThirdApi {
public void syncExamStudyRecord(ExamStudyRecordParam 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);
}
}

View File

@@ -886,7 +886,7 @@ public class CourseManageApi extends ApiBaseController{
* @return
*/
@PostMapping("/delete")
public JsonResponse<Boolean> delete(String id,Boolean erasable,String title,String remark){
public JsonResponse<Boolean> delete(String id,Boolean erasable,String title,String remark, HttpServletRequest request){
if(StringUtils.isBlank(id)){
return badRequest("参数错误");
}
@@ -901,6 +901,11 @@ public class CourseManageApi extends ApiBaseController{
try {
CurrentUser cu=getCurrent();
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);
} catch (Exception e) {
log.error("管理员删除课程错误",e);

View File

@@ -74,3 +74,4 @@ coursesuilt:
syncCourseStudent: ${boe.domain}/manageApi/admin/teacherRecord/syncCourseStudent
syncOnLineScore: ${boe.domain}/manageApi/admin/teacherRecord/syncOnLineScore
updateOnLineStatua: ${boe.domain}/manageApi/admin/teacherRecord/updateOnLineStatua
delOnLineById: ${boe.domain}/manageApi/admin/teacherRecord/delOnLineById