|
@@ -7,9 +7,12 @@ import com.ym.mec.biz.dal.entity.School;
|
|
|
import com.ym.mec.biz.dal.entity.Teacher;
|
|
|
import com.ym.mec.biz.service.SchoolService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
+
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
+
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -72,6 +75,14 @@ public class TeacherSchoolController extends BaseController {
|
|
|
if(sysUser == null){
|
|
|
return failed(HttpStatus.FORBIDDEN,"请登录");
|
|
|
}
|
|
|
- return succeed(schoolService.findVipSchoolByTeacher(sysUser.getId(),sysUser.getOrganId(),isDefault));
|
|
|
+ Teacher teacher = teacherDao.get(sysUser.getId());
|
|
|
+ if(teacher == null){
|
|
|
+ return failed("非法访问");
|
|
|
+ }
|
|
|
+ String organIdList = teacher.getOrganId();
|
|
|
+ if (StringUtils.isNoneBlank(teacher.getFlowOrganRange())) {
|
|
|
+ organIdList = organIdList + "," + teacher.getFlowOrganRange();
|
|
|
+ }
|
|
|
+ return succeed(schoolService.findVipSchoolByTeacher(sysUser.getId(),organIdList,isDefault));
|
|
|
}
|
|
|
}
|