From 5dec8dcc45b40a1d7acdf05be2f2ffd00759535e Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期六, 07 六月 2025 16:11:30 +0800
Subject: [PATCH] 1、*-global.yml配置文件中增加有关萤石云应用的配置; 2、萤石云视频监控相关数据库设计(萤石应用+视频监控站); 3、remote模块增加定时下载萤石应用AccessToken的监听器,及网络下载逻辑,数据库存储等功能实现;

---
 pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java
index c535adf..365f3ec 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java
@@ -20,6 +20,7 @@
 import com.dy.pipIrrGlobal.pojoSe.SeRechargeProfile;
 import com.dy.pipIrrGlobal.pojoSe.SeWaterType;
 import com.dy.pipIrrGlobal.util.DistrictLevel;
+import lombok.extern.slf4j.Slf4j;
 import org.jdom2.Document;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.context.event.ApplicationReadyEvent;
@@ -34,6 +35,7 @@
  * Spring瀹瑰櫒骞舵病鏈夊垱寤哄畬锛岃�屾湰绫讳腑鐢ㄤ簡Spring瀹瑰櫒涓殑Bean锛屽嵆distriDao, userDao銆�
  * 鎵�浠ラ噰鐢ㄤ簡Spring浜嬩欢鐩戝惉鍣ㄦ潵瀹炵幇
  */
+@Slf4j
 @Component
 public class InitListener implements ApplicationListener<ApplicationReadyEvent> {
 
@@ -118,7 +120,7 @@
     @Override
     public void onApplicationEvent(@NonNull ApplicationReadyEvent event) {
         try {
-            //绛�1绉掞紝绛夊緟com.alibaba.druid.pool.DruidDataSource瀹炲鍖栧畬鎴�
+            //绛�1绉掞紝绛夊緟com.alibaba.druid.pool.DruidDataSource鍒濆鍖栧畬鎴�
             Thread.sleep(1000L);
         } catch (InterruptedException e) {
             e.printStackTrace();
@@ -128,7 +130,7 @@
     }
 
     /**
-     * 瀹炲鍖�
+     * 鍒濆鍖�
      */
     @SuppressWarnings("unused ")
     private void init(ApplicationReadyEvent event){
@@ -137,17 +139,22 @@
             Document doc = configXml.createDom(this.resourceLoader, "init-config.xml") ;
             this.doInit(configXml, doc);
         } catch (Exception e) {
-            System.out.println("绯荤粺鍚姩鏃讹紝鍒濆鍖栭厤缃嚭閿� !");
-            System.out.println(e.getMessage());
+            log.error("绯荤粺鍚姩鏃讹紝鍒濆鍖栭厤缃嚭閿� !");
+            log.error(e.getMessage());
             e.printStackTrace();
         }
     }
     private void doInit(ConfigXml4Springboot configXml, Document doc) throws Exception{
+        //Check if configXml and doc are not null
         if(configXml != null && doc != null){
+            //Loop through 10000 orgs
             for(int num = 1; num <= 10000; num++){
+                //Check if the org exists
                 if(configXml.existElement(doc, "config.orgs.org" + num)){
+                    //Get the tag and enable value of the org
                     String orgTag = configXml.getSetAttrTxt(doc, "config.orgs.org" + num,"tag", null, false, null) ;
                     Boolean enable = configXml.getSetAttrBoolean(doc, "config.orgs.org" + num, "enable", null, null);
+                    //If the org is enabled
                     if(enable != null && enable.booleanValue()){
                         //璁剧疆鏁版嵁婧�
                         DataSourceContext.set(orgTag);

--
Gitblit v1.8.0