Init - 初始化仓库

master
wenjy 9 months ago
parent 3b64dee043
commit 31182182ca

@ -39,7 +39,7 @@ namespace Ems.CollectService.Analysis
private BufferAnalysis() private BufferAnalysis()
{ {
logger.Info($"版本更新修复连接ID重复主动断开原有连接信息建立新连接");
} }
/// <summary> /// <summary>
@ -154,7 +154,7 @@ namespace Ems.CollectService.Analysis
if(SendMessageAsync(client, SendMessagePackInfo)) if(SendMessageAsync(client, SendMessagePackInfo))
{ {
logger.Debug($"向客户端:{client.ID};地址:{client.GetIPPort()};回复心跳指令成功"); logger.Debug($"向客户端:{client.ID};地址:{client.GetIPPort()};回复心跳指令成功");
Thread.Sleep(500); Thread.Sleep(2000);
SendMessagePackInfo.m_MessageType = (byte)CallbackSendData._SetTime; SendMessagePackInfo.m_MessageType = (byte)CallbackSendData._SetTime;
SendMessagePackInfo.m_PackLen = new byte[] {0x00, 0x0D}; SendMessagePackInfo.m_PackLen = new byte[] {0x00, 0x0D};
bool isRes = SendTimeSyncToClient(client, SendMessagePackInfo); bool isRes = SendTimeSyncToClient(client, SendMessagePackInfo);

@ -18,8 +18,8 @@ namespace Ems.CollectService.SqlSugarCore
//用单例模式 //用单例模式
public static SqlSugarScope Db = new SqlSugarScope(new ConnectionConfig() public static SqlSugarScope Db = new SqlSugarScope(new ConnectionConfig()
{ {
ConnectionString = _configuration.GetValue<string>("SystemConfig:mysqlConnStr"),//连接符字串 ConnectionString = _configuration.GetValue<string>("SystemConfig:sqlServerConnStr"),//连接符字串
DbType = DbType.MySql,//数据库类型 DbType = DbType.SqlServer,//数据库类型
IsAutoCloseConnection = true //不设成true要手动close IsAutoCloseConnection = true //不设成true要手动close
}, },
db => { db => {

Loading…
Cancel
Save