szx-1241 类型转换处理

This commit is contained in:
Caojr
2025-09-28 20:20:48 +08:00
parent 80aaeb8d1d
commit ab60d845e0

View File

@@ -818,12 +818,13 @@ public class CourseServiceImpl implements ICourseService {
String body = "courseId=" + id + " aid=" + aid + " name=" + name + " remark=" + remark;
String location = "/xboe/m/course/manage/delete";
List<CourseTeacher> teacherList = courseTeacherDao.findByCourseId(id);
log.info("teacherList:{}", JSONUtil.toJsonStr(teacherList));
String jsonStr = JSONUtil.toJsonStr(teacherList);
log.info("teacherList:{}", jsonStr);
try {
List<List<CourseTeacher>> list = JSONUtil.toBean(JSONUtil.toJsonStr(teacherList), List.class);
List<List> list = JSONUtil.toList(jsonStr, List.class);
list.forEach(item -> {
for (CourseTeacher teacher : item) {
courseTeacherModifyRecordDao.insertRecord("DELETE", location, teacher, body);
for (Object teacher : item) {
courseTeacherModifyRecordDao.insertRecord("DELETE", location, (CourseTeacher) teacher, body);
}
});
} catch (Exception e) {