Joburgess 5 years ago
parent
commit
bb11ddbcc0

+ 7 - 5
mec-biz/src/main/java/com/ym/mec/biz/event/StudentCourseChangeEvent.java

@@ -9,19 +9,21 @@ import org.springframework.context.ApplicationEvent;
  */
 public class StudentCourseChangeEvent extends ApplicationEvent {
 
-    private Integer userId;
+    private Integer[] userIds;
 
     private String groupId;
 
     private GroupType groupType;
 
-    public StudentCourseChangeEvent(Object source, Integer userId, String groupId, GroupType groupType) {
+    public StudentCourseChangeEvent(Object source, String groupId, GroupType groupType, Integer... userIds) {
         super(source);
-        this.userId = userId;
+        this.userIds = userIds;
+        this.groupId = groupId;
+        this.groupType = groupType;
     }
 
-    public Integer getUserId() {
-        return userId;
+    public Integer[] getUserId() {
+        return userIds;
     }
 
     public String getGroupId() {

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/event/source/StudentEventSource.java

@@ -24,10 +24,10 @@ public class StudentEventSource {
      * @describe 学生课程计划变更通知
      * @author Joburgess
      * @date 2020.09.24
-     * @param userId: 用户编号
+     * @param userIds: 用户编号
      * @return void
      */
-    public void studentCourseChange(Integer userId, String groupId, GroupType groupType) {
-        applicationContext.publishEvent(new StudentCourseChangeEvent(this, userId, groupId, groupType));
+    public void studentCourseChange(String groupId, GroupType groupType, Integer... userIds) {
+        applicationContext.publishEvent(new StudentCourseChangeEvent(this, groupId, groupType, userIds));
     }
 }

+ 0 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -136,9 +136,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
     @Autowired
 	private ClassGroupTeacherMapperDao classGroupTeacherMapperDao;
 
-    @Autowired
-	private StudentEventSource studentEventSource;
-
     private final Logger LOGGER = LoggerFactory
             .getLogger(this.getClass());
 
@@ -2781,8 +2778,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         vipGroupApplyDto.setSingleClassPrice(vipGroupCourseAdjustInfo.getSingleClassPrice());
         vipGroupService.appendVipGroupCourseSchedules(vipGroupApplyDto);
         classGroupService.updateClassGroupInfo(classGroup.getId());
-
-		studentEventSource.studentCourseChange(vipGroup.getUserId(), vipGroup.getId().toString(), VIP);
 //        vipGroupService.checkVipCourseIsInScore(vipGroupCourseAdjustInfo.getVipGroupId().longValue());
     }