dev #2
@ -9,6 +9,10 @@ using JiShe.CollectBus.EnergySystems.TableViews;
|
|||||||
using JiShe.CollectBus.FreeSql;
|
using JiShe.CollectBus.FreeSql;
|
||||||
using Volo.Abp.Domain.Repositories;
|
using Volo.Abp.Domain.Repositories;
|
||||||
using JiShe.CollectBus.IotSystems.PrepayModel;
|
using JiShe.CollectBus.IotSystems.PrepayModel;
|
||||||
|
using JiShe.CollectBus.Ammeters;
|
||||||
|
using JiShe.CollectBus.Common.BuildSendDatas;
|
||||||
|
using JiShe.CollectBus.Common.Enums;
|
||||||
|
using JiShe.CollectBus.Common.Helpers;
|
||||||
|
|
||||||
namespace JiShe.CollectBus.EnergySystem
|
namespace JiShe.CollectBus.EnergySystem
|
||||||
{
|
{
|
||||||
@ -24,7 +28,6 @@ namespace JiShe.CollectBus.EnergySystem
|
|||||||
{
|
{
|
||||||
await FreeRedisProvider.Instance.HSetAsync($"{RedisConst.CacheAmmeterFocusKey}:{group.Key}", group.ToDictionary(a => $"{a.ID}_{a.Address}", b => b));
|
await FreeRedisProvider.Instance.HSetAsync($"{RedisConst.CacheAmmeterFocusKey}:{group.Key}", group.ToDictionary(a => $"{a.ID}_{a.Address}", b => b));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -262,6 +262,11 @@ namespace JiShe.CollectBus.Host
|
|||||||
x.UseKafka(option =>
|
x.UseKafka(option =>
|
||||||
{
|
{
|
||||||
option.Servers = kafka;
|
option.Servers = kafka;
|
||||||
|
if (!Convert.ToBoolean(configuration["Kafka:EnableAuthorization"])) return;
|
||||||
|
option.MainConfig.Add("security.protocol", configuration["Kafka:SecurityProtocol"]);
|
||||||
|
option.MainConfig.Add("sasl.mechanism", configuration["Kafka:SaslMechanism"]);
|
||||||
|
option.MainConfig.Add("sasl.username", configuration["Kafka:SaslUserName"]);
|
||||||
|
option.MainConfig.Add("sasl.password", configuration["Kafka:SaslPassword"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
x.UseDashboard();
|
x.UseDashboard();
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"Serilog": {
|
"Serilog": {
|
||||||
"Using": [
|
"Using": [
|
||||||
"Serilog.Sinks.Console",
|
"Serilog.Sinks.Console",
|
||||||
@ -20,7 +20,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "Console"
|
"Name": "Console"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "File",
|
"Name": "File",
|
||||||
"Args": {
|
"Args": {
|
||||||
"path": "logs/logs-.txt",
|
"path": "logs/logs-.txt",
|
||||||
@ -33,17 +33,18 @@
|
|||||||
"SelfUrl": "http://localhost:44315",
|
"SelfUrl": "http://localhost:44315",
|
||||||
"CorsOrigins": "http://localhost:4200,http://localhost:3100"
|
"CorsOrigins": "http://localhost:4200,http://localhost:3100"
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"Default": "mongodb://admin:admin02023@118.190.144.92:37117,118.190.144.92:37119,118.190.144.92:37120/JiSheCollectBus?authSource=admin&maxPoolSize=400&minPoolSize=10&waitQueueTimeoutMS=5000",
|
"Default": "mongodb://admin:admin02023@118.190.144.92:37117,118.190.144.92:37119,118.190.144.92:37120/JiSheCollectBus?authSource=admin&maxPoolSize=400&minPoolSize=10&waitQueueTimeoutMS=5000",
|
||||||
"Kafka": "121.42.242.91:29092,121.42.242.91:39092,121.42.242.91:49092",
|
//"Kafka": "121.42.242.91:29092,121.42.242.91:39092,121.42.242.91:49092",
|
||||||
"PrepayDB": "server=118.190.144.92;database=jishe.sysdb;uid=sa;pwd=admin@2023;Encrypt=False;Trust Server Certificate=False",
|
"Kafka": "8.148.227.21:9092,8.148.224.127:9092,8.138.38.208:9092",
|
||||||
"EnergyDB": "server=118.190.144.92;database=db_energy;uid=sa;pwd=admin@2023;Encrypt=False;Trust Server Certificate=False"
|
"PrepayDB": "server=118.190.144.92;database=jishe.sysdb;uid=sa;pwd=admin@2023;Encrypt=False;Trust Server Certificate=False",
|
||||||
},
|
"EnergyDB": "server=118.190.144.92;database=db_energy;uid=sa;pwd=admin@2023;Encrypt=False;Trust Server Certificate=False"
|
||||||
"Redis": {
|
},
|
||||||
"Configuration": "118.190.144.92:6379,syncTimeout=30000,abortConnect=false,connectTimeout=30000,allowAdmin=true",
|
"Redis": {
|
||||||
"DefaultDB": "14",
|
"Configuration": "118.190.144.92:6379,syncTimeout=30000,abortConnect=false,connectTimeout=30000,allowAdmin=true",
|
||||||
"HangfireDB": "15"
|
"DefaultDB": "14",
|
||||||
},
|
"HangfireDB": "15"
|
||||||
|
},
|
||||||
"Jwt": {
|
"Jwt": {
|
||||||
"Audience": "JiShe.CollectBus",
|
"Audience": "JiShe.CollectBus",
|
||||||
"SecurityKey": "dzehzRz9a8asdfasfdadfasdfasdfafsdadfasbasdf=",
|
"SecurityKey": "dzehzRz9a8asdfasfdadfasdfasdfafsdadfasbasdf=",
|
||||||
@ -80,5 +81,12 @@
|
|||||||
"Password": "123456",
|
"Password": "123456",
|
||||||
"Port": 5672
|
"Port": 5672
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Kafka": {
|
||||||
|
"EnableAuthorization": true,
|
||||||
|
"SecurityProtocol": "SASL_PLAINTEXT",
|
||||||
|
"SaslMechanism": "PLAIN",
|
||||||
|
"SaslUserName": "lixiao",
|
||||||
|
"SaslPassword": "lixiao1980"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user