| 
					
				 | 
			
			
				@@ -2,16 +2,19 @@ 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.entity.Subject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.service.SubjectService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.common.controller.BaseController; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ym.mec.common.entity.HttpResponseResult; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.http.HttpStatus; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.GetMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.RequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.RestController; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import javax.annotation.Resource; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.Objects; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -23,14 +26,14 @@ import java.util.Objects; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @RestController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 public class TeacherSubjectController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private SubjectService subjectService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private SysUserFeignService sysUserFeignService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation(value = "获取教师所在科目列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/findTeacherSubjets") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Object findTeacherSubjets(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public HttpResponseResult<List<Subject>> findTeacherSubjets(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SysUser sysUser = sysUserFeignService.queryUserInfo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(Objects.isNull(sysUser)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return failed(HttpStatus.FORBIDDEN,"请登录"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -40,8 +43,13 @@ public class TeacherSubjectController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation(value = "获取子集科目列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/findSubSubjects") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Object findSubSubjects(Integer tenantId){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public HttpResponseResult<List<Subject>> findSubSubjects(Integer tenantId){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return succeed(subjectService.findSubSubjects(null)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @ApiOperation(value = "获取指定名称的科目列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @GetMapping("/findByNames") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public HttpResponseResult<List<Subject>> findByNames() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return succeed(subjectService.getDao().findByNames()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |