|
|
|
@ -1,7 +1,6 @@
|
|
|
|
|
using Autofac;
|
|
|
|
|
using Entity.Constant;
|
|
|
|
|
using HybirdFrameworkCore.Autofac;
|
|
|
|
|
using Service.Station;
|
|
|
|
|
using Service.System;
|
|
|
|
|
|
|
|
|
|
namespace Service.Init;
|
|
|
|
@ -135,17 +134,17 @@ public class StaticStationInfo
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
string port = Resolve(StationParamConst.CloudServerPort);
|
|
|
|
|
if (string.IsNullOrWhiteSpace(port))
|
|
|
|
|
{
|
|
|
|
|
return 33000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string port = Resolve(StationParamConst.CloudServerPort, "33000");
|
|
|
|
|
return int.Parse(port);
|
|
|
|
|
}
|
|
|
|
|
set => Set(StationParamConst.CloudServerPort, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string CloudServerMqttVersion
|
|
|
|
|
{
|
|
|
|
|
get => Resolve(StationParamConst.CloudServerMqttVersion, "4.0.0");
|
|
|
|
|
set => Set(StationParamConst.CloudServerMqttVersion, value);
|
|
|
|
|
}
|
|
|
|
|
public static string CloudClientId
|
|
|
|
|
{
|
|
|
|
|
get => Resolve(StationParamConst.CloudClientId);
|
|
|
|
@ -182,7 +181,7 @@ public class StaticStationInfo
|
|
|
|
|
|
|
|
|
|
private static SysConfigService _sysConfigService;
|
|
|
|
|
|
|
|
|
|
private static string Resolve(string key)
|
|
|
|
|
private static string Resolve(string key, string? value = default)
|
|
|
|
|
{
|
|
|
|
|
if (_sysConfigService == null)
|
|
|
|
|
{
|
|
|
|
@ -195,7 +194,7 @@ public class StaticStationInfo
|
|
|
|
|
return s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return "";
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void Set(string key, object value)
|
|
|
|
|