From 4796f4a91d85dedb5a30d2f5d3844c5720f5919a Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期五, 13 五月 2022 17:36:46 +0800
Subject: [PATCH] 2022年05月13日17:36:43

---
 HDL_ON/DAL/Server/HttpServerRequest.cs |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 2414895..0fdea4a 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -45,13 +45,17 @@
         /// <param name="deviceId">璁惧ID</param>
         /// <param name="deviceKey">鍔熻兘鏌ヨ绫诲瀷锛歱m25</param>
         /// <returns></returns>
-        public ResponsePackNew GetSensorHistory(string qType, string deviceId, string deviceKey)
+        public ResponsePackNew GetSensorHistory(string qType, string deviceId, string deviceKey,string time = "")
         {
             Dictionary<string, object> d = new Dictionary<string, object>();
             d.Add("type", qType);
             d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
             d.Add("deviceId", deviceId);
             d.Add("key", deviceKey);
+            if(time!= "")
+            {
+                d.Add("time", time);
+            }
 
             var requestJson = HttpUtil.GetSignRequestJson(d);
             return HttpUtil.RequestHttpsPost(NewAPI.Api_Post_EnvironmentalSensorHistoricalData, requestJson);
@@ -152,6 +156,10 @@
                 sdm.AccessToken = UserInfo.Current.LoginTokenString;
                 sdm.RefreshToken = UserInfo.Current.RefreshToken;
 #endif
+            }
+            else if (revertObj.Code == StateCode.PasswrodError)
+            {
+                UserInfo.Current.LastTime = DateTime.MinValue;
             }
             return revertObj.Code;
         }
@@ -1025,10 +1033,10 @@
 #endif
                 //鏄惁鐢熶骇妯″紡
                 bool isProduce = true;
-#if DEBUG
-                isProduce = false;
-#endif
-
+                if (HttpUtil.GlobalRequestHttpsHost == "https://test-gz.hdlcontrol.com")
+                {
+                    isProduce = false;
+                }
                 if (string.IsNullOrEmpty(OnAppConfig.Instance.PushDeviceToken))
                 {
                     Utlis.WriteLine("PushDeviceToken 涓虹┖");
@@ -1946,15 +1954,18 @@
         /// 鑾峰彇璁惧鍒楄〃
         /// </summary>
         /// <returns></returns>
-        public ResponsePackNew GetDeviceList()
+        public ResponsePackNew GetDeviceList(string pageSize="",string pageNo ="")
         {
             Dictionary<string, object> d = new Dictionary<string, object>();
             d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
             //d.Add("gatewayId", DB_ResidenceData.residenceData.HomeGateway.gatewayId);
             //d.Add("roomId", DB_ResidenceData.residenceData.residecenInfo.RegionID);//鍙帶鍙傛暟锛屽綋闇�瑕佸垎椤佃幏鍙栵紝鎬庝箞鐭ラ亾鍒嗛〉鎬绘暟
             //d.Add("searchType", DB_ResidenceData.residenceData.residecenInfo.RegionID);
-            //d.Add("pageSize", DB_ResidenceData.residenceData.residecenInfo.RegionID);
-            //d.Add("pageNo", DB_ResidenceData.residenceData.residecenInfo.RegionID);
+            if (!string.IsNullOrEmpty(pageSize))
+            {
+                d.Add("pageSize", pageSize);
+                d.Add("pageNo", pageNo);
+            }
 
             var requestJson = HttpUtil.GetSignRequestJson(d);
             return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDevcieList, requestJson);

--
Gitblit v1.8.0