From 23bbed132eea46eef51c6d01c21b346238e29ee2 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 30 六月 2022 13:39:12 +0800 Subject: [PATCH] Merge branch 'wxr0114' into V1.5.9 --- HDL_ON/DAL/Server/HttpServerRequest.cs | 44 ++++++++++++++------------------------------ 1 files changed, 14 insertions(+), 30 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index 0e0a902..8efd6e5 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -5,6 +5,7 @@ using System.Text; using HDL_ON.Entity; using Newtonsoft.Json.Linq; +using Shared; namespace HDL_ON.DAL.Server { @@ -45,17 +46,13 @@ /// <param name="deviceId">璁惧ID</param> /// <param name="deviceKey">鍔熻兘鏌ヨ绫诲瀷锛歱m25</param> /// <returns></returns> - public ResponsePackNew GetSensorHistory(string qType, string deviceId, string deviceKey,string time = "") + public ResponsePackNew GetSensorHistory(string qType, string deviceId, string deviceKey) { 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); @@ -1033,10 +1030,10 @@ #endif //鏄惁鐢熶骇妯″紡 bool isProduce = true; - if (HttpUtil.GlobalRequestHttpsHost == "https://test-gz.hdlcontrol.com") - { - isProduce = false; - } +#if DEBUG + isProduce = true; +#endif + if (string.IsNullOrEmpty(OnAppConfig.Instance.PushDeviceToken)) { Utlis.WriteLine("PushDeviceToken 涓虹┖"); @@ -1061,9 +1058,15 @@ //var mAddpushinfoJson = Newtonsoft.Json.JsonConvert.SerializeObject(mAddpushinfoObj); var mAddpushinfoJson = HttpUtil.GetSignRequestJson(mAddpushinfoObj); + + Utlis.WriteLine("mAddpushinfoJson: " + mAddpushinfoJson); + + //new Alert("", , "鍙栨秷", "纭畾").Show(); var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_AddToken, mAddpushinfoJson); if (revertObj.Code == StateCode.SUCCESS) { + //new Alert("", "鎻愪氦pushToken鎴愬姛" + OnAppConfig.Instance.PushDeviceToken, "鍙栨秷", "纭畾").Show(); + if (revertObj.Data != null) { var pushId = revertObj.Data.ToString(); @@ -1072,7 +1075,7 @@ OnAppConfig.Instance.PushId = pushId; OnAppConfig.Instance.SaveConfig(); Utlis.WriteLine("PushId: " + pushId); - + //new Alert("","鎻愪氦pushToken鎴愬姛"+ OnAppConfig.Instance.PushDeviceToken, "鍙栨秷","纭畾").Show(); return true; } } @@ -1080,7 +1083,7 @@ } else { - //Utlis.WriteLine("AddToken 澶辫触"); + Utlis.WriteLine("AddToken 澶辫触"); } return false; } @@ -2621,25 +2624,6 @@ 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