mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-12 04:16:51 +08:00
szx-1241 类型转换处理
This commit is contained in:
@@ -818,12 +818,13 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
String body = "courseId=" + id + " aid=" + aid + " name=" + name + " remark=" + remark;
|
String body = "courseId=" + id + " aid=" + aid + " name=" + name + " remark=" + remark;
|
||||||
String location = "/xboe/m/course/manage/delete";
|
String location = "/xboe/m/course/manage/delete";
|
||||||
List<CourseTeacher> teacherList = courseTeacherDao.findByCourseId(id);
|
List<CourseTeacher> teacherList = courseTeacherDao.findByCourseId(id);
|
||||||
log.info("teacherList:{}", JSONUtil.toJsonStr(teacherList));
|
String jsonStr = JSONUtil.toJsonStr(teacherList);
|
||||||
|
log.info("teacherList:{}", jsonStr);
|
||||||
try {
|
try {
|
||||||
List<List<CourseTeacher>> list = JSONUtil.toBean(JSONUtil.toJsonStr(teacherList), List.class);
|
List<List> list = JSONUtil.toList(jsonStr, List.class);
|
||||||
list.forEach(item -> {
|
list.forEach(item -> {
|
||||||
for (CourseTeacher teacher : item) {
|
for (Object teacher : item) {
|
||||||
courseTeacherModifyRecordDao.insertRecord("DELETE", location, teacher, body);
|
courseTeacherModifyRecordDao.insertRecord("DELETE", location, (CourseTeacher) teacher, body);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user