From 4e76b9737e036c18e8a9e840dc443615ffcec348 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期四, 20 十月 2022 12:20:18 +0800
Subject: [PATCH] 大气农耕

---
 ximon-admin/src/main/java/com/sandu/ximon/admin/config/VnnoxConstant.java |   53 +++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 47 insertions(+), 6 deletions(-)

diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/config/VnnoxConstant.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/config/VnnoxConstant.java
index 9ba2426..2203b8f 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/config/VnnoxConstant.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/config/VnnoxConstant.java
@@ -1,28 +1,69 @@
 package com.sandu.ximon.admin.config;
 
 import com.google.gson.Gson;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
 
-public class VnnoxConstant {
+@Component
+public class VnnoxConstant implements InitializingBean {
 
     //  VNNOX MINIO save bucket  suffix(companyId)
     public static final String MINIO_PREFIX = "vnnox.";
 
     public static final String REDIS_TOKEN_NAME = "vnnox_token";
     public static final String REDIS_SCREEN_STATUS = "vnnox_screen_status:";
+    public static final String REDIS_PROGRESS = "vnnox_progress:";
     public static final String REDIS_VOL = "vnnox_vol:";
     public static final String REDIS_BRIGHTNESS = "vnnox_brightness:";
-    public static final String REDIS_PROGRESS = "vnnox_progress:";
+    public static final String VIDEO_SOURCE_VALUE = "video_source_value:";
+    public static final String TIME_VALUE_TIME = "time_value_time :";
+    public static final String TIME_VALUE_TIMEZONE = "time_value_timezone :";
+    public static final String SYNC_PLAY_STATUS = "sync_play_status:";
     public static final String REDIS_SCREEN_SHOT = "vnnox_screen_shot:";
 
     public static final Long REDIS_MAX_SAVE_TIME = 180 * 24 * 60 * 60L;
     public static final Long SCREEN_SHOT_TIMEOUT = 30 * 60L;
+    public static final Long STATUS_TIME = 3 * 60 * 60L;
 
-    public static final String NOTIFY_URL = "http://47.106.172.9:8888/machine-fast/serv/vnnox/progress";
-    public static final String SCREEN_SHOT_NOTIFY_URL = "http://47.106.172.9:8888/machine-fast/serv/vnnox/screenshot";
+    @Value("${nova-conf.notify-url}")
+    private String notifyUrl;
+    @Value("${nova-conf.screen-shot-notify-url}")
+    private String screenShotNotifyUrl;
+    @Value("${nova-conf.status-notify-url}")
+    private String statusNotifyUrl;
+    @Value("${nova-conf.username}")
+    private String userName;
+    @Value("${nova-conf.password}")
+    private String passWord;
 
-    public static final String username = "zhxm";
-    public static final String password = "xm2512209.";
+
+    public static String NOTIFY_URL;
+    public static String SCREEN_SHOT_NOTIFY_URL;
+    public static String STATUS_NOTIFY_URL;
+
+    public static String username;
+    public static String password;
 
     public static final Gson GSON = new Gson();
 
+
+    @Override
+    public void afterPropertiesSet() throws Exception {
+        NOTIFY_URL = notifyUrl;
+
+        SCREEN_SHOT_NOTIFY_URL = screenShotNotifyUrl;
+
+        STATUS_NOTIFY_URL = statusNotifyUrl;
+
+        username = userName;
+
+        password = passWord;
+
+
+    }
+
+    public static void main(String[] args) {
+        System.out.println(VnnoxConstant.SCREEN_SHOT_NOTIFY_URL);
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3