From 7eb8b78a26accd059cf8e17d756f6d77e6b3f9dd Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 09 六月 2022 21:40:26 +0800 Subject: [PATCH] 2022年06月09日21:39:40 --- HDL_ON/DAL/Server/HttpServerRequest.cs | 33 ++++++++++++++++++++++++++++----- 1 files changed, 28 insertions(+), 5 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index 738cd33..0e0a902 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); @@ -1029,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 涓虹┖"); @@ -2617,6 +2621,25 @@ var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_FL_Check, requestJson); return pack; } + /// <summary> + /// 鑾峰彇闂ㄥ彛鏈哄緲寰婃姤璀︽暟鎹� + /// </summary> + /// <param name="deviceId"></param> + /// <returns></returns> + public ResponsePackNew GetAlarmRecords(string deviceId, int pageSize, int pageNo, string alarmType = "PROWLER_ALARM") + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("deviceId", deviceId); + d.Add("alarmType", alarmType); + d.Add("pageSize", pageSize); + d.Add("pageNo", pageNo); + var requestJson = HttpUtil.GetSignRequestJson(d); + var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_ALARM_RECORDS, requestJson); + return pack; + + } + #endregion #region 鈻� 闂ㄩ攣鐩稿叧____________________________ -- Gitblit v1.8.0