Pārlūkot izejas kodu

增加小班,添加学员接口

周箭河 5 gadi atpakaļ
vecāks
revīzija
eda869f2b2

+ 3 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupStudentMapperServiceImpl.java

@@ -53,7 +53,7 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
         student.setClassGroupId(null);
         studentRegistrationService.update(student);
 
-        //班级人数调整
+        //2、班级人数调整
         classGroupService.updateClassStudentNum(classGroupId.longValue(), -1);
 
         //3、删除学生对应班级的课程
@@ -68,6 +68,7 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public boolean adjustClassGroup(Integer userId, Integer oldClassGroupId, Integer classGroupId) throws Exception {
         ClassGroupStudentMapper classStudentMapper = findClassStudentMapperByUserIdAndClassGroupId(userId, oldClassGroupId);
         if (classStudentMapper == null) {
@@ -106,6 +107,7 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public boolean addStudents(Integer classGroupId, String userIdsStr) throws Exception {
         ClassGroup classGroup = classGroupService.get(classGroupId);
         if (classGroup == null) {