Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

Joburgess 5 anni fa
parent
commit
a4ad2406f4

+ 11 - 1
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherController.java

@@ -2,6 +2,7 @@ package com.ym.mec.teacher.controller;
 
 import com.ym.mec.biz.service.ImGroupNoticeService;
 import com.ym.mec.common.page.QueryInfo;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -10,6 +11,7 @@ import io.swagger.annotations.ApiParam;
 
 import java.util.Date;
 
+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;
@@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.SubjectDao;
 import com.ym.mec.biz.dal.entity.Teacher;
 import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
 import com.ym.mec.biz.dal.page.TeacherMusicClassQueryInfo;
@@ -45,6 +48,8 @@ public class TeacherController extends BaseController {
     private ClassGroupService classGroupService;
     @Autowired
     private SysUserFeignService sysUserFeignService;
+	@Autowired
+	private SubjectDao subjectDao;
 
     @ApiOperation(value = "修改教师个人中心信息")
     @PostMapping("/update")
@@ -66,7 +71,12 @@ public class TeacherController extends BaseController {
 		if (user == null) {
 			return failed(HttpStatus.FORBIDDEN, "请登录");
 		}
-        return succeed(teacherService.get(user.getId()));
+		Teacher teacher = teacherService.get(user.getId());
+		//专业技能
+		if(StringUtils.isNotEmpty(teacher.getSubjectId())){
+			teacher.setSubjectName(subjectDao.findBySubIds(teacher.getSubjectId()));
+		}
+        return succeed(teacher);
     }
 
     @ApiOperation(value = "根据教师编号查询教师基本信息")