refactor(notification): 使用雪花算法ID生成器替换System.currentTimeMillis()
This commit is contained in:
parent
f06e895eb1
commit
1307216327
@ -1,5 +1,6 @@
|
||||
package art.kexue.sxwz.service.impl;
|
||||
|
||||
import art.kexue.sxwz.common.util.IDUtils;
|
||||
import art.kexue.sxwz.entity.EduCourseStudent;
|
||||
import art.kexue.sxwz.entity.SysNotification;
|
||||
import art.kexue.sxwz.entity.SysUser;
|
||||
@ -219,7 +220,7 @@ public class SysNotificationServiceImpl implements SysNotificationService {
|
||||
String content, Integer type, Long senderId,
|
||||
String senderName, Integer targetType) {
|
||||
SysNotification notification = new SysNotification();
|
||||
notification.setId(System.currentTimeMillis());
|
||||
notification.setId(IDUtils.getSnowflakeId());
|
||||
notification.setSchoolId(schoolId);
|
||||
notification.setUserId(userId);
|
||||
notification.setTitle(title);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user