|
|
@@ -5,6 +5,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.xjrsoft.common.enums.DeleteMark;
|
|
|
import com.xjrsoft.common.model.result.RT;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
|
@@ -85,7 +86,9 @@ public class RoomBedAdjustController {
|
|
|
|
|
|
long teacherId = StpUtil.getLoginIdAsLong();
|
|
|
List<BaseClass> classList = baseClassService.list(
|
|
|
- new QueryWrapper<BaseClass>().lambda().eq(BaseClass::getTeacherId, teacherId)
|
|
|
+ new QueryWrapper<BaseClass>().lambda()
|
|
|
+ .eq(BaseClass::getTeacherId, teacherId)
|
|
|
+ .eq(BaseClass::getDeleteMark, DeleteMark.NODELETE.getCode())
|
|
|
);
|
|
|
if(roleList.size() == 2 && roleList.contains("CLASSTE") && roleList.contains("TEACHER") && dto.getRoomId() == null){
|
|
|
if(classList != null && !classList.isEmpty()){
|
|
|
@@ -160,13 +163,14 @@ public class RoomBedAdjustController {
|
|
|
|
|
|
long teacherId = StpUtil.getLoginIdAsLong();
|
|
|
List<BaseClass> classList = baseClassService.list(
|
|
|
- new QueryWrapper<BaseClass>().lambda().eq(BaseClass::getTeacherId, teacherId)
|
|
|
+ new QueryWrapper<BaseClass>().lambda()
|
|
|
+ .eq(BaseClass::getTeacherId, teacherId)
|
|
|
+ .eq(BaseClass::getDeleteMark, DeleteMark.NODELETE.getCode())
|
|
|
);
|
|
|
if(roleList.size() == 2 && roleList.contains("CLASSTE") && roleList.contains("TEACHER")){
|
|
|
if(classList != null && !classList.isEmpty()){
|
|
|
dto.setClassId(classList.get(0).getId());
|
|
|
}
|
|
|
- //dto.setIsTeacher(1);
|
|
|
}
|
|
|
List<TeacherRoomListVo> teacherRoomList = roomBedService.getTeacherRoomList(dto);
|
|
|
return RT.ok(teacherRoomList);
|