You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
716 B
29 lines
716 B
|
1 month ago
|
package com.youlai.boot.common.event;
|
||
|
|
|
||
|
|
import lombok.Getter;
|
||
|
|
import org.springframework.context.ApplicationEvent;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 用户注册成功事件
|
||
|
|
* 所有注册成功后需要执行的附加逻辑(送积分、送优惠券、发通知等)都监听这个事件即可
|
||
|
|
*/
|
||
|
|
@Getter
|
||
|
|
public class UserRegisterEvent extends ApplicationEvent {
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 新注册用户的ID
|
||
|
|
*/
|
||
|
|
private final Long userId;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 注册来源:MINI_PROGRAM小程序 / H5 / ADMIN后台等
|
||
|
|
*/
|
||
|
|
private final String registerSource;
|
||
|
|
|
||
|
|
public UserRegisterEvent(Long userId, String registerSource) {
|
||
|
|
super(userId);
|
||
|
|
this.userId = userId;
|
||
|
|
this.registerSource = registerSource;
|
||
|
|
}
|
||
|
|
}
|