瀏覽代碼

同一个学员可以在多个线上基础技能班

zouxuan 3 年之前
父節點
當前提交
32c6a627d2

+ 5 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -1444,9 +1444,12 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
             }
             if (type.equals(ClassGroupTypeEnum.SNAP)) continue;
             for (ClassGroupStudentMapper classGroupStudentMapper : classGroupStudentMappers) {
+                //一个班不能有重复的学员,不能在多个非线上基础技能班
                 if (student.getUserId().equals(classGroupStudentMapper.getUserId())) {
-                    iterator.remove();
-                    break;
+                    if(Objects.equals(classGroupId,classGroupStudentMapper.getClassGroupId()) || type != ClassGroupTypeEnum.HIGH_ONLINE){
+                        iterator.remove();
+                        break;
+                    }
                 }
             }
         }