|
|
@@ -1,22 +1,30 @@
|
|
|
package com.usoftchina.smartschool.device.listener;
|
|
|
|
|
|
+import com.usoftchina.smartschool.device.api.DeviceApi;
|
|
|
+import com.usoftchina.smartschool.device.dto.DeviceInfo;
|
|
|
import com.usoftchina.smartschool.device.event.AccessControlEvent;
|
|
|
import com.usoftchina.smartschool.file.api.FileApi;
|
|
|
+import org.springframework.beans.factory.InitializingBean;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.event.EventListener;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* @author yingp
|
|
|
* @date 2019/3/8
|
|
|
*/
|
|
|
@Component
|
|
|
-public class AccessControlListener {
|
|
|
+public class AccessControlListener implements InitializingBean{
|
|
|
|
|
|
@Autowired
|
|
|
private FileApi fileApi;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private DeviceApi deviceApi;
|
|
|
+
|
|
|
/**
|
|
|
* 门禁事件
|
|
|
*
|
|
|
@@ -31,4 +39,10 @@ public class AccessControlListener {
|
|
|
* 3、推送消息到消息服务器(微信服务监听此消息发送微信消息)
|
|
|
*/
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void afterPropertiesSet() throws Exception {
|
|
|
+ List<DeviceInfo> deviceInfos = null;
|
|
|
+ deviceInfos.forEach(deviceApi::add);
|
|
|
+ }
|
|
|
}
|