|
@@ -18,6 +18,7 @@ import com.xjrsoft.module.organization.vo.UserStudentVo;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudent;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudentUser;
|
|
|
+import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -69,10 +70,14 @@ public class BaseClassServiceImpl extends MPJBaseServiceImpl<BaseClassMapper, Ba
|
|
|
MPJLambdaWrapper<BaseClass> queryWrapper = new MPJLambdaWrapper<>();
|
|
|
queryWrapper
|
|
|
.disableSubLogicDel()
|
|
|
- .rightJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getClassId, BaseStudent::getId)
|
|
|
+ .innerJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getClassId, BaseStudent::getId)
|
|
|
.innerJoin(BaseStudentUser.class, BaseStudentUser::getId, BaseStudentSchoolRoll::getUserId)
|
|
|
+ .leftJoin(XjrUser.class, XjrUser::getId, BaseClass::getTeacherId)
|
|
|
.eq(BaseStudentSchoolRoll::getUserId, id)
|
|
|
.selectAs(BaseClass::getName, UserStudentVo::getClassName)
|
|
|
+ .selectAs(XjrUser::getName, UserStudentVo::getTeacherName)
|
|
|
+ .selectAs(XjrUser::getMobile, UserStudentVo::getTeacherMobile)
|
|
|
+ .selectAs(XjrUser::getId, UserStudentVo::getTeacherId)
|
|
|
.selectAs(BaseStudentUser::getName, UserStudentVo::getStudentName)
|
|
|
.selectAs(BaseStudentUser::getId, UserStudentVo::getStudentId)
|
|
|
.selectAs(BaseStudentSchoolRoll::getClassId, UserStudentVo::getClassId)
|