dzx 4 месяцев назад
Родитель
Сommit
8b83b01171

+ 4 - 0
src/main/java/com/xjrsoft/module/base/service/impl/BaseClassServiceImpl.java

@@ -49,11 +49,15 @@ public class BaseClassServiceImpl extends MPJBaseServiceImpl<BaseClassMapper, Ba
                     .disableSubLogicDel()
                     .rightJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getClassId, BaseStudent::getId)
                     .innerJoin(BaseStudentUser.class, BaseStudentUser::getId, BaseStudentSchoolRoll::getUserId)
+                    .leftJoin(XjrUser.class, XjrUser::getId, BaseClass::getTeacherId)
                     .in(BaseStudentSchoolRoll::getUserId, studentIds)
                     .selectAs(BaseClass::getName, UserStudentVo::getClassName)
                     .selectAs(BaseStudentUser::getName, UserStudentVo::getStudentName)
                     .selectAs(BaseStudentUser::getId, UserStudentVo::getStudentId)
                     .selectAs(BaseStudentSchoolRoll::getClassId, UserStudentVo::getClassId)
+                    .selectAs(XjrUser::getName, UserStudentVo::getTeacherName)
+                    .selectAs(XjrUser::getMobile, UserStudentVo::getTeacherMobile)
+                    .selectAs(XjrUser::getId, UserStudentVo::getTeacherId)
                     .selectAs(BaseStudentUser::getAvatar, UserStudentVo::getAvatar);
 
             list = selectJoinList(UserStudentVo.class, queryWrapper);