增加 升级功能的 日志监控

This commit is contained in:
2026-03-17 15:58:22 +08:00
parent ddd4f5a6b4
commit a93c11fbfe
8 changed files with 108 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ using Common;
using Dao;
using Domain;
using RCUHost.Protocols;
using CommonEntity;
namespace RCUHost.Implement
{
@@ -221,6 +222,28 @@ namespace RCUHost.Implement
byte[] data = CreateUpdateRequestPacket(updateFileMd5, blockNum, fileType, fileName);
logger.Error("升级HostNumber为" + host.HostNumber);
logger.Error("升级指令为:" + Tools.ByteToString(data));
ShengJi_Log s1 = new ShengJi_Log();
s1.hotel_id = host.SysHotel.Code;
s1.room_id = host.RoomNumber;
s1.device_id = host.HostNumber;
s1.is_send = 1;
s1.udp_raw = data;
string ipAndPort = CSRedisCacheHelper.Get<string>(host.HostNumber, host.MAC);
if (!string.IsNullOrEmpty(ipAndPort))
{
s1.remote_endpoint = ipAndPort;
}
s1.md5 = updateFileMd5;
s1.partition = blockNum;
s1.file_type = fileType;
s1.file_path = fileName;
s1.upgrade_state = 0;
s1.app_version = host.Version;
CSRedisCacheHelper.Publish("redis-up", Newtonsoft.Json.JsonConvert.SerializeObject(s1));
Send(data, host.HostNumber, host.MAC);// host.IP, host.Port);
}
/// <summary>