天猫精灵背景音乐 ,官方文档 上的设置接口不管用,经过询问使用 另一个接口,完美解决
This commit is contained in:
@@ -184,7 +184,7 @@ namespace WebSite.Controllers
|
||||
Abnormal4Date = Convert.ToDateTime(r[15]).Year < 1900 ? "" : Convert.ToDateTime(r[15]).ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
Abnormal5 = Convert.ToDateTime(r[17]).Year < 1900 ? "" : r[16],
|
||||
Abnormal5Date = Convert.ToDateTime(r[17]).Year < 1900 ? "" : Convert.ToDateTime(r[17]).ToString("yyyy-MM-dd HH:mm:ss")
|
||||
}).Where(A=>!string.IsNullOrEmpty(A.Name));
|
||||
}).Where(A => !string.IsNullOrEmpty(A.Name));
|
||||
return Json(restult, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
@@ -408,10 +408,10 @@ namespace WebSite.Controllers
|
||||
//string nenghaoKey = CacheKey.NengHao + "_" + mac;
|
||||
string nenghaoKey = CacheKey.NengHao + "_" + host_number;
|
||||
//var NNNHHH = CSRedisCacheHelper.ForeverGet<NengHao>(nenghaoKey);
|
||||
var NNNHHH = CSRedisCacheHelper.Get_Partition<NengHao>(nenghaoKey,1);
|
||||
var NNNHHH = CSRedisCacheHelper.Get_Partition<NengHao>(nenghaoKey, 1);
|
||||
if (NNNHHH != null)
|
||||
{
|
||||
roomModel.Power = NNNHHH.P.ToString()+"w";
|
||||
roomModel.Power = NNNHHH.P.ToString() + "w";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -581,7 +581,18 @@ namespace WebSite.Controllers
|
||||
//}
|
||||
//②获取服务信息
|
||||
//var services = HostModalManager.Load(room.HostID, DeviceType.ServiceInfo).Where(r => r.Modal.ActiveIndicator && r.Status == 1);
|
||||
var services = HostModalManager.Load(room.HostID, DeviceType.ServiceInfo).Where(r => r.Modal.ActiveIndicator);
|
||||
string KKServiceInfo = "ServiceInfo_" + room.HostID;
|
||||
var oobsc = HttpContext.Cache.Get(KKServiceInfo);
|
||||
IList<HostModal> services = null;
|
||||
if (oobsc != null)
|
||||
{
|
||||
services = oobsc as IList<HostModal>;
|
||||
}
|
||||
else
|
||||
{
|
||||
services = HostModalManager.Load(room.HostID, DeviceType.ServiceInfo).Where(r => r.Modal.ActiveIndicator).ToList();
|
||||
HttpContext.Cache.Insert(KKServiceInfo,services,null,DateTime.Now.AddMinutes(30),Cache.NoSlidingExpiration);
|
||||
}
|
||||
roomModel.Services = new List<ServiceModel>();
|
||||
foreach (var service in services)
|
||||
{
|
||||
@@ -739,7 +750,7 @@ namespace WebSite.Controllers
|
||||
|
||||
if (string.IsNullOrEmpty(roomModel.Power))
|
||||
{
|
||||
roomModel.Power = "";
|
||||
roomModel.Power = "";
|
||||
}
|
||||
floor.Sort = room.GroupSort;
|
||||
rooms.Add(roomModel);
|
||||
|
||||
Reference in New Issue
Block a user