szx-1241 处理异常

This commit is contained in:
Caojr
2025-09-28 20:06:31 +08:00
parent 57dc5262fb
commit 68fcde11fb

View File

@@ -819,9 +819,16 @@ public class CourseServiceImpl implements ICourseService {
String location = "/xboe/m/course/manage/delete";
List<CourseTeacher> teacherList = courseTeacherDao.findByCourseId(id);
log.info("teacherList:{}", JSONUtil.toJsonStr(teacherList));
for (CourseTeacher teacher : teacherList) {
try {
List<List<CourseTeacher>> list = JSONUtil.toBean(JSONUtil.toJsonStr(teacherList), List.class);
list.forEach(item -> {
for (CourseTeacher teacher : item) {
courseTeacherModifyRecordDao.insertRecord("DELETE", location, teacher, body);
}
});
} catch (Exception e) {
log.warn("增加操作boe_course_teacher表记录失败", e);
}
if (!erasable) {
courseDao.setDeleted(id);