|
|
@@ -40,13 +40,21 @@ public class BaseStudentSchoolRollServiceImpl extends MPJBaseServiceImpl<BaseStu
|
|
|
|
|
|
@Override
|
|
|
public Page<BaseStudentInfoPageVo> getMobilePage(Page<BaseStudentInfoPageVo> page, BaseStudentInfoPageDto dto) {
|
|
|
+
|
|
|
+ List<String> roleList = StpUtil.getRoleList();
|
|
|
+
|
|
|
long teacherId = StpUtil.getLoginIdAsLong();
|
|
|
List<BaseClass> classList = baseClassMapper.selectList(
|
|
|
new QueryWrapper<BaseClass>().lambda().eq(BaseClass::getTeacherId, teacherId)
|
|
|
);
|
|
|
-
|
|
|
- if(classList != null && !classList.isEmpty()){
|
|
|
- dto.setTeacherId(teacherId);
|
|
|
+ if(roleList.size() == 1 && roleList.contains("CLASSTE")){
|
|
|
+ if(classList != null && !classList.isEmpty()){
|
|
|
+ dto.setTeacherId(teacherId);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(classList != null && !classList.isEmpty() && dto.getClassId() == null){
|
|
|
+ dto.setClassId(classList.get(0).getId());
|
|
|
+ }
|
|
|
}
|
|
|
return baseStudentSchoolRollMapper.getMobilePage(page, dto);
|
|
|
}
|