update 修正个人星级数据获取

develop
hhb@hotmail.com 2 months ago
parent 4d4ca44dce
commit ad4bebd1b9

@ -838,7 +838,14 @@ public class TeacherServiceImpl implements TeacherService {
mapTeach.put("paperCount",count); mapTeach.put("paperCount",count);
// 检查 sugVos 是否为空 // 检查 sugVos 是否为空
if (!sugVos.isEmpty()) { if (!sugVos.isEmpty()) {
mapTeach.put("starLevel", sugVos.get(0).getStar_level()); //获取sugVos中starLevel不为空的值
for( SugVo sugVo : sugVos){
if (sugVo.getStar_level() != null) {
mapTeach.put("starLevel", sugVo.getStar_level());
break; // 找到一个不为空的值就退出循环
}
}
//mapTeach.put("starLevel", sugVos.get(0).getStar_level());
} else { } else {
// 处理空列表的情况,例如设置默认值 // 处理空列表的情况,例如设置默认值
mapTeach.put("starLevel", 0); // 或者其他默认值 mapTeach.put("starLevel", 0); // 或者其他默认值

Loading…
Cancel
Save