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