update 非空验证

develop
hhb@hotmail.com 5 months ago
parent c030a0d58a
commit eb617c938f

@ -781,7 +781,13 @@ public class TeacherServiceImpl implements TeacherService {
mapTeach.put("MaterialCount",scores[8]);
mapTeach.put("TpcplanCount",scores[9]);
mapTeach.put("Lessons",lessonRecords.size());
mapTeach.put("starLevel", sugVos.get(0).getStar_level());
// 检查 sugVos 是否为空
if (!sugVos.isEmpty()) {
mapTeach.put("starLevel", sugVos.get(0).getStar_level());
} else {
// 处理空列表的情况,例如设置默认值
mapTeach.put("starLevel", 0); // 或者其他默认值
}
return mapTeach;
}else if(teacherDto.getGradeName() != null) {

Loading…
Cancel
Save