增加初始化

master
smartwyy 6 months ago
parent 468e825396
commit 6f2c47dcc1

@ -65,7 +65,7 @@ public static class ClientMgr
if (equipInfos.Count > 0)
{
Dictionary<string,EquipInfo> set = equipInfos.ToDictionary(it => it.Code, it => it);
List<EquipNetInfo> equipNetInfos = netInfoRepository.QueryListByClause(it => set.ContainsKey(it.Code));
List<EquipNetInfo> equipNetInfos = netInfoRepository.QueryListByClause(it => set.Keys.Contains(it.Code));
foreach (EquipNetInfo netInfo in equipNetInfos)
{
Task.Run(() =>
@ -73,6 +73,8 @@ public static class ClientMgr
ConnClient(netInfo);
});
}
StartAutoChargeThread();
}
}

@ -4,6 +4,7 @@ using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Configuration;
using HybirdFrameworkCore.Entity;
using HybirdFrameworkCore.Redis;
using Service.Charger.Client;
using SqlSugar;
using SqlSugar.IOC;
@ -91,4 +92,6 @@ app.MapControllers();
AppInfo.Container = app.Services.GetAutofacRoot();
ClientMgr.InitClient();
app.Run();

@ -2,7 +2,7 @@
"ConnectionStrings": {
"ConfigId": "master",
"DbType": "MySql",
"SqlConnection": "server=localhost;Port=3306;Database=winformdevframework;Uid=root;Pwd=123456;Charset=utf8;"
"SqlConnection": "server=180.76.133.253;Port=16306;Database=huanneng_dev;Uid=root;Pwd=Rszn123;Charset=utf8"
},
"Update": {
"AutoUpdate": "false",

@ -2,7 +2,7 @@
"ConnectionStrings": {
"ConfigId": "master",
"DbType": "MySql",
"SqlConnection": "server=localhost;Port=3306;Database=winformdevframework;Uid=root;Pwd=123456;Charset=utf8;"
"SqlConnection": "server=180.76.133.253;Port=16306;Database=huanneng_dev;Uid=root;Pwd=Rszn123;Charset=utf8"
},
"Update": {
"AutoUpdate": "false",

Loading…
Cancel
Save