Browse Source

课程评价推送

zouxuan 3 years ago
parent
commit
af9e384176

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

@@ -105,8 +105,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 	}
 
 	public void sendMessage(List<Integer> studentIds,CourseSchedule.CourseScheduleType type,String courseDate,MessageTypeEnum messageTypeEnum){
-		Map<Integer, String> receivers = new HashMap<>(studentIds.size());
-		studentIds.stream().map(e->receivers.put(e,e.toString()));
+		Map<Integer, String> receivers = studentIds.stream().collect(Collectors.toMap(e -> e, e -> e.toString()));
 		sendMessageSource.batchSendMessage(MessageSender.JIGUANG,messageTypeEnum,
 				receivers,null,"STUDENT",courseDate,type.getMsg());
 	}