|
@@ -3,6 +3,7 @@ package com.ym.mec.teacher.controller;
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dao.TeacherDao;
|
|
|
+import com.ym.mec.biz.dal.entity.Teacher;
|
|
|
import com.ym.mec.biz.dal.entity.VipGroupCategory;
|
|
|
import com.ym.mec.biz.service.VipGroupCategoryService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
@@ -44,11 +45,11 @@ public class VipGroupCategoryController extends BaseController {
|
|
|
if (Objects.isNull(user)) {
|
|
|
return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
|
}
|
|
|
-// Teacher teacher = teacherDao.get(user.getId());
|
|
|
-// if(Objects.isNull(teacher)){
|
|
|
-// return failed("教师信息不存在");
|
|
|
-// }
|
|
|
- return succeed(vipGroupCategoryService.findAllByOrgan(user.getOrganId()));
|
|
|
+ Teacher teacher = teacherDao.get(user.getId());
|
|
|
+ if(Objects.isNull(teacher)){
|
|
|
+ return failed("教师信息不存在");
|
|
|
+ }
|
|
|
+ return succeed(vipGroupCategoryService.findAllByOrgan(teacher.getTeacherOrganId().toString()));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("新增")
|