ソースを参照

Merge branch 'dev' of ssh://10.10.100.21/source/smartschool-platform into dev

chenw 7 年 前
コミット
f0f7f1479b

+ 15 - 1
applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/listener/AccessControlListener.java

@@ -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);
+    }
 }

+ 8 - 0
applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/mapper/DeviceMapper.java

@@ -0,0 +1,8 @@
+package com.usoftchina.smartschool.device.mapper;
+
+/**
+ * @author yingp
+ * @date 2019/3/8
+ */
+public interface DeviceMapper {
+}