增加测量环境和正常环境切换
This commit is contained in:
parent
7ddff1b1a6
commit
ee8ca6596d
|
|
@ -21,6 +21,8 @@ namespace Waste.Application.ThirdApiInfo
|
|||
private static string UserId = App.Configuration["SZDevPlatSetting:UserId"];
|
||||
private static string ApiSecret = App.Configuration["SZDevPlatSetting:ApiSecret"];
|
||||
private static string ApiSecretHash = App.Configuration["SZDevPlatSetting:ApiSecretHash"];
|
||||
private static string WebSocketUrl = App.Configuration["SZDevPlatSetting:SocketUrl"];
|
||||
|
||||
private readonly ISqlSugarRepository<W_Device> repository;
|
||||
private readonly SqlSugarClient dbClient;
|
||||
private readonly ISuZhouService _suZhouService;
|
||||
|
|
@ -328,7 +330,7 @@ namespace Waste.Application.ThirdApiInfo
|
|||
var data = new DevRegInfoResponseDto
|
||||
{
|
||||
status = 0,
|
||||
WebSocketUrl = App.Configuration["SZDevPlatSetting:SocketUrl"]
|
||||
WebSocketUrl = WebSocketUrl
|
||||
};
|
||||
//获取授权信息
|
||||
var devicesecret = await dbClient.Queryable<W_SZDevice>().FirstAsync(x => x.DeviceId == device.Id);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace Waste.Core
|
|||
}
|
||||
if (!string.IsNullOrEmpty(request.Headers["User-Agent"].ToString()))
|
||||
{
|
||||
diagnosticContext.Set("User-Agent", request.Headers["User-Agent"].ToString());
|
||||
diagnosticContext.Set("UserAgent", request.Headers["User-Agent"].ToString());
|
||||
}
|
||||
if (request.Method == "POST" && request.ContentLength > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,14 +35,14 @@
|
|||
"Algorithm": "HS256" // 加密算法,string 类型,默认 SecurityAlgorithms.HmacSha256
|
||||
},
|
||||
"logfile": "e:/errlog/waste.ybhdmob.com", //日志文件路径
|
||||
//"NirvanaConnection":"Server=localhost,4331;Database=waste;uid=jutian_user;pwd=jutian1qaz@WSX;",
|
||||
"NirvanaConnection": "Server=123.60.2.99,4331;Database=waste;uid=jutian_user;pwd=jutian1qaz@WSX;",
|
||||
//"SZDevPlatSetting": { //苏州设备接入平台设置,测试环境
|
||||
// "ApiUrl": "https://bright.ljflytjl.cn:9101",
|
||||
// "UserId": "18e76eb9-9154-4b43-bcfe-f80671ab8e79",
|
||||
// "ApiSecret": "1KXWKC1WA8V8eCDX",
|
||||
// "ApiSecretHash": "5567485e9458ee89"
|
||||
//},
|
||||
"SZTestDevPlatSetting": { //苏州设备接入平台设置,测试环境
|
||||
"ApiUrl": "https://bright.ljflytjl.cn:9101",
|
||||
"UserId": "18e76eb9-9154-4b43-bcfe-f80671ab8e79",
|
||||
"ApiSecret": "1KXWKC1WA8V8eCDX",
|
||||
"ApiSecretHash": "5567485e9458ee89",
|
||||
"SocketUrl": "wss://bright.ljflytjl.cn:9101/device_rpc"
|
||||
},
|
||||
"SZDevPlatSetting": { //苏州设备接入平台设置,正式环境
|
||||
"ApiUrl": "https://api.data.suzhou.ljflytjl.cn",
|
||||
"UserId": "55863a65-a28c-4e7f-8835-1fa779e1eb9f",
|
||||
|
|
|
|||
|
|
@ -17,8 +17,9 @@ namespace WasteConsoleTest
|
|||
class Program
|
||||
{
|
||||
private static WSocketClientHelp wSocketClient = null;
|
||||
public static string Secret = "lsBThmYBYUMrmwkl";
|
||||
public static string SecretHash = "bfbaf98fb5b343b2";
|
||||
public static string Secret = "0eMqhAjefL0loGhH";
|
||||
public static string SecretHash = "d28a95b3d5d85ef0";
|
||||
public static string SocketURL = "wss://bright.ljflytjl.cn:9101/device_rpc";
|
||||
static async Task Main(string[] args)
|
||||
{
|
||||
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
|
||||
|
|
@ -27,7 +28,7 @@ namespace WasteConsoleTest
|
|||
services.AddTransient<IMyService, MyService>();
|
||||
}).UseConsoleLifetime();
|
||||
var host = builder.Build();
|
||||
wSocketClient = new WSocketClientHelp("wss://api.device.suzhou.ljflytjl.cn/device_rpc");
|
||||
wSocketClient = new WSocketClientHelp(SocketURL);
|
||||
wSocketClient.OnOpen -= WSocketClient_OnOpen;
|
||||
wSocketClient.OnMessage -= WSocketClient_OnMessage;
|
||||
wSocketClient.OnClose -= WSocketClient_OnClose;
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ namespace WasteConsoleTest
|
|||
ClientWebSocket ws = null;
|
||||
Uri uri = null;
|
||||
bool isUserClose = false;//是否最后由用户手动关闭
|
||||
public static string Secret = "lsBThmYBYUMrmwkl";
|
||||
public static string SecretHash = "bfbaf98fb5b343b2";
|
||||
public static string deviceid = "08d9588d-4796-48f9-8c5b-f28f271b51d0";
|
||||
public static string Secret = "0eMqhAjefL0loGhH";
|
||||
public static string SecretHash = "d28a95b3d5d85ef0";
|
||||
public static string deviceid = "08d954b6-df45-4de1-8fde-f5109798b855";
|
||||
|
||||
// <summary>
|
||||
/// WebSocket状态
|
||||
|
|
|
|||
Loading…
Reference in New Issue