zouxuan 4 년 전
부모
커밋
7a78bcfc36

+ 1 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java

@@ -543,6 +543,5 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @param courseIds
      * @param classGroupStudents
      */
-    void spanGroupClassAdjustPass(Integer masterClassGroupId,List<Integer> studentIds,List<Long> courseIds,List<Map<String,
-            String>> classGroupStudents,List<Long> allLockCourseIds,String batchNo,BigDecimal masterTotalPrice);
+    void spanGroupClassAdjustPass(Integer masterClassGroupId,List<Integer> studentIds,List<Long> courseIds,List<Map> classGroupStudents,List<Long> allLockCourseIds,String batchNo,BigDecimal masterTotalPrice);
 }

+ 8 - 8
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -3781,7 +3781,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         musicGroupStudentClassAdjustDao.insert(musicGroupStudentClassAdjust);
         //没有需要审核的缴费项目
         if (paymentCalenderDto.getStatus() != AUDITING) {
-            List<Map<String,String>> classGroupStudents1 = (List<Map<String,String>>)JSON.parse(musicGroupStudentClassAdjust.getClassGroupStudents());
+            List<Map> classGroupStudents1 = JSON.parseArray(musicGroupStudentClassAdjust.getClassGroupStudents(),Map.class);
             spanGroupClassAdjustPass(masterClassGroupId,studentIds,courseIds,classGroupStudents1,allLockCourseIds,paymentCalenderDto.getBatchNo(),masterTotalPrice);
             return "操作成功:学员班级调整完成";
         }else {
@@ -3798,20 +3798,20 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     public void spanGroupClassAdjustPass(Integer masterClassGroupId,
                                          List<Integer> studentIds,
                                          List<Long> courseIds,
-                                         List<Map<String, String>> classGroupStudents,
+                                         List<Map> classGroupStudents,
                                          List<Long> allLockCourseIds,
                                          String batchNo,BigDecimal masterTotalPrice){
         //删除班级关联的学员
         List<Integer> classGroupIds = new ArrayList<>();
         if (classGroupStudents != null && classGroupStudents.size() > 0) {
-            for (Map<String, String> classGroupStudent : classGroupStudents) {
-                Set<String> integers = classGroupStudent.keySet();
-                for (String integer : integers) {
+            for (Map<Integer, String> classGroupStudent : classGroupStudents) {
+                Set<Integer> integers = classGroupStudent.keySet();
+                for (Integer integer : integers) {
                     List<Integer> collect = Arrays.asList(classGroupStudent.get(integer).split(",")).stream().map(e -> Integer.parseInt(e)).collect(Collectors.toList());
                     //学员退出群聊
-                    imGroupMemberService.quit(Long.parseLong(integer),collect);
-                    classGroupIds.add(Integer.parseInt(integer));
-                    classGroupStudentMapperDao.deleteByClassGroupIdAndStudents(Integer.parseInt(integer), classGroupStudent.get(integer));
+                    imGroupMemberService.quit(integer.longValue(),collect);
+                    classGroupIds.add(integer);
+                    classGroupStudentMapperDao.deleteByClassGroupIdAndStudents(integer, classGroupStudent.get(integer));
                 }
             }
         }

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

@@ -805,7 +805,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 			}else if(paymentType == SPAN_GROUP_CLASS_ADJUST){
 				//删除和解冻班级,课程信息
 				MusicGroupStudentClassAdjust adjust = musicGroupStudentClassAdjustDao.findByBatchNo(batchNo);
-				List<Map<String,String>> classGroupStudents = (List<Map<String,String>>)JSON.parse(adjust.getClassGroupStudents());
+				List<Map> classGroupStudents = JSON.parseArray(adjust.getClassGroupStudents(),Map.class);
 				List<Integer> studentIds = JSON.parseArray(adjust.getStudentIds(), Integer.class);
 				List<Long> courseIds = JSON.parseArray(adjust.getSubLockCourseIds(), Long.class);
 				List<Long> allLockCourseIds = JSON.parseArray(adjust.getAllLockCourseIds(), Long.class);
@@ -1123,7 +1123,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		}else if(calender.getPaymentType() == SPAN_GROUP_CLASS_ADJUST){
 			//删除和解冻班级,课程信息
 			MusicGroupStudentClassAdjust adjust = musicGroupStudentClassAdjustDao.findByBatchNo(batchNo);
-			List<Map<String,String>> classGroupStudents = (List<Map<String,String>>)JSON.parse(adjust.getClassGroupStudents());
+			List<Map> classGroupStudents = JSON.parseArray(adjust.getClassGroupStudents(),Map.class);
 			List<Integer> studentIds = JSON.parseArray(adjust.getStudentIds(), Integer.class);
 			List<Long> courseIds = JSON.parseArray(adjust.getSubLockCourseIds(), Long.class);
 			List<Long> allLockCourseIds = JSON.parseArray(adjust.getAllLockCourseIds(), Long.class);

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml

@@ -746,7 +746,7 @@
         LEFT JOIN subject s ON sr.actual_subject_id_ = s.id_
         where sr.music_group_id_ = #{musicGroupId} and sr.user_id_ = #{studentId}
     </select>
-    <select id="getStudentSubjectNameByStuIds" resultType="java.lang.String">
+    <select id="getStudentSubjectNameByStuIds" resultType="java.util.Map">
         SELECT sr.user_id_ 'key',s.name_ 'value'
         FROM student_registration sr
         LEFT JOIN subject s ON sr.actual_subject_id_ = s.id_