|
@@ -15,6 +15,7 @@ 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.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -32,6 +33,8 @@ public class EduSchoolController extends BaseController {
|
|
|
private SchoolService schoolService;
|
|
|
@Autowired
|
|
|
private TeacherDao teacherDao;
|
|
|
+ @Autowired
|
|
|
+ private SysUserFeignService sysUserFeignService;
|
|
|
|
|
|
@ApiOperation(value = "获取教师vip课教学点")
|
|
|
@GetMapping("/findVipSchoolByTeacher")
|
|
@@ -49,4 +52,23 @@ public class EduSchoolController extends BaseController {
|
|
|
}
|
|
|
return succeed(schoolService.findVipSchoolByTeacher(userId,organId,null));
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取教师vip课教学点")
|
|
|
+ @GetMapping("/findVipSchoolByTeacher2")
|
|
|
+ public Object findVipSchoolByTeacher2(Integer isDefault){
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if(sysUser == null){
|
|
|
+ return failed(HttpStatus.FORBIDDEN,"请登录");
|
|
|
+ }
|
|
|
+ Teacher teacher = teacherDao.get(sysUser.getId());
|
|
|
+ if(teacher == null){
|
|
|
+ return failed("非法访问");
|
|
|
+ }
|
|
|
+
|
|
|
+ String organIdList = teacher.getTeacherOrganId().toString();
|
|
|
+ if (StringUtils.isNoneBlank(teacher.getFlowOrganRange())) {
|
|
|
+ organIdList += "," + teacher.getFlowOrganRange();
|
|
|
+ }
|
|
|
+ return succeed(schoolService.findVipSchoolByTeacher(sysUser.getId(),organIdList,isDefault));
|
|
|
+ }
|
|
|
}
|