瀏覽代碼

Merge branch 'bug_20220913' into music_bug_202220922

liujunchi 2 年之前
父節點
當前提交
f183c867c5

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java

@@ -1314,7 +1314,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
         if (teacherId == null) {
         	Student student = studentService.getById(studentId);
         	Long subjectId = null;
-            if (student != null) {
+            if (student != null && student.getSubjectId() != null) {
             	subjectId = Long.parseLong(student.getSubjectId());
             }
             

+ 5 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherServiceImpl.java

@@ -636,8 +636,12 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
     	}
     	
     	Student student = studentService.getById(userId);
+        Long subjectId = null;
+        if (student.getSubjectId()!= null) {
+            subjectId = Long.parseLong(student.getSubjectId());
+        }
     	
-    	List<HotTeacherVo> hotTeacherList = baseMapper.queryHotTeacherList(Long.parseLong(student.getSubjectId()));
+    	List<HotTeacherVo> hotTeacherList = baseMapper.queryHotTeacherList(subjectId);
     	for(HotTeacherVo vo : hotTeacherList){
     		if(watchTeacherIdList.contains(vo.getUserId())){
     			vo.setWatch(true);