给选住增加 设备变化 推送接口
This commit is contained in:
@@ -6741,7 +6741,18 @@ namespace WebSite.Controllers
|
||||
i.CommandDescription = sss;
|
||||
SendMQTTData.Send(i);
|
||||
}
|
||||
var hostModal = HostModalManager.GetByModalAddress(host.ID, modalAddress);//设备控制
|
||||
string MKey = "XiaoDuAddress_" + host.ID + "_" + modalAddress;
|
||||
var ddd = HttpContext.Cache.Get(MKey);
|
||||
HostModal hostModal = null;
|
||||
if (ddd != null)
|
||||
{
|
||||
hostModal = ddd as HostModal;
|
||||
}
|
||||
else
|
||||
{
|
||||
hostModal = HostModalManager.GetByModalAddress(host.ID, modalAddress);//设备控制
|
||||
HttpContext.Cache.Insert(MKey,hostModal,null,DateTime.Now.AddMinutes(30),Cache.NoSlidingExpiration);
|
||||
}
|
||||
if (hostModal == null)
|
||||
{
|
||||
logger.Error(string.Format("{3}(酒店:{0},房号:{1})未找到对应的回路,Address:{2}", host.SysHotel.Code + host.SysHotel.Name, host.RoomNumber, modalAddress, platformName));
|
||||
|
||||
Reference in New Issue
Block a user