baizonghao
2023-07-31 98b2f41e13c48219e054cf8b80c459298a01c910
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
package com.mindskip.xzs.listener;
 
import com.mindskip.xzs.event.UserEvent;
import com.mindskip.xzs.service.UserEventLogService;
import lombok.AllArgsConstructor;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
 
/**
 * @version 2.2.0
 * @description: 用户日志监听器
 * Copyright (C), 2020-2021, 武汉思维跳跃科技有限公司
 * @date 2021 /9/7 9:45
 */
@Component
@AllArgsConstructor
public class UserLogListener implements ApplicationListener<UserEvent> {
 
    private UserEventLogService userEventLogService;
 
    @Override
    public void onApplicationEvent(UserEvent userEvent) {
        userEventLogService.insertByFilter(userEvent.getUserEventLog());
    }
 
}