diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/controller/AiolClassController.java b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/controller/AiolClassController.java index c442b5e6..dd3b176b 100644 --- a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/controller/AiolClassController.java +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/controller/AiolClassController.java @@ -21,6 +21,7 @@ import org.jeecg.modules.aiol.service.IAiolUserInfoService; import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.mapper.SysUserMapper; import org.jeecg.modules.system.service.ISysUserService; +import org.jeecg.modules.aiol.mapper.AiolUserInfoMapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -60,6 +61,8 @@ public class AiolClassController extends JeecgController userInfoWrapper = new QueryWrapper<>(); + userInfoWrapper.eq("user_id", classStudent.getStudentId()); + AiolUserInfo userInfo = aiolUserInfoMapper.selectOne(userInfoWrapper); + if (userInfo != null) { + studentInfo.put("major", userInfo.getMajor()); + studentInfo.put("college", userInfo.getCollege()); + studentInfo.put("education", userInfo.getEducation()); + studentInfo.put("title", userInfo.getTitle()); + } else { + // 如果没有扩展信息,设置默认值 + studentInfo.put("major", ""); + studentInfo.put("college", ""); + studentInfo.put("education", ""); + studentInfo.put("title", ""); } result.add(studentInfo);