1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package cn.iocoder.yudao.module.system.event;
 
import lombok.Data;
 
/**
 * 社交登录成功事件
 *
 * 当用户通过社交平台(如企业微信)扫码登录成功后发布此事件,
 * 供其他模块监听并执行后续操作(如发送通知等)
 *
 * @author 超级管理员
 */
@Data
public class SocialLoginEvent {
 
    /**
     * 社交类型,对应 {@link cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum}
     */
    private final Integer socialType;
 
    /**
     * 系统用户 ID
     */
    private final Long userId;
 
    /**
     * 用户登录名
     */
    private final String username;
 
    /**
     * 登录方式描述
     */
    private final String loginType;
 
    public SocialLoginEvent(Integer socialType, Long userId, String username, String loginType) {
        this.socialType = socialType;
        this.userId = userId;
        this.username = username;
        this.loginType = loginType;
    }
 
}