feat:() 添加数据库事件
parent
98560aacdc
commit
0a2fc7a9ce
|
@ -0,0 +1,34 @@
|
|||
package com.muyu.processing.listener;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.muyu.processing.basic.EventCustom;
|
||||
import com.muyu.processing.basic.EventListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* 添加数据库事件
|
||||
* @Author:杨鹏
|
||||
* @Package:com.muyu.processing.listener
|
||||
* @Project:car-cloud-server
|
||||
* @name:AddDatabaseListener
|
||||
* @Date:2024/9/29 22:25
|
||||
*/
|
||||
public class AddDatabaseListener implements EventListener {
|
||||
@Override
|
||||
public void onEvent(EventCustom event) {
|
||||
JSONObject jsonObject = event.getData();
|
||||
ArrayList<Object> keys = new ArrayList<>();
|
||||
ArrayList<Object> values = new ArrayList<>();
|
||||
jsonObject.forEach((key, value) ->{
|
||||
keys.add(key);
|
||||
values.add(value);
|
||||
});
|
||||
// 添加数据库
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(EventCustom event) {
|
||||
onEvent(event);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue