From 86c5efb3d78c3fe294da95872b43bac1ce324c08 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 16 三月 2023 10:43:41 +0800 Subject: [PATCH] 修复功能信息修改直接返回两次回调问题 --- HDL_ON/DAL/Server/HttpServerRequest.cs | 70 ++++++++++++++++++++++++++++++----- 1 files changed, 60 insertions(+), 10 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index 4ba45b6..7d4034e 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -726,7 +726,7 @@ { var requestObj = new ChildDeleteObj() { - childAccountId = subaccount.childAccountId, + childId = subaccount.id, homeId = subaccount.homeId }; var requestJson = HttpUtil.GetSignRequestJson(requestObj); @@ -741,12 +741,11 @@ /// <returns></returns> public ResponsePackNew EditSubAccountNickName(string nickName, string childAccountId) { - var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildNickNameObj() - { - homeId = DB_ResidenceData.Instance.CurrentRegion.id, - childAccountId = childAccountId, - nickName = nickName, - }); + var d = new Dictionary<string, string>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("childId", childAccountId); + d.Add("nickName", nickName); + var requestJson = HttpUtil.GetSignRequestJson(d); return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Update, requestJson); } @@ -761,7 +760,7 @@ var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildAllowCreateSceneObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.id, - childAccountId = childAccountId, + childId = childAccountId, isAllowCreateScene = isAllow, }); return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Update, requestJson); @@ -977,10 +976,60 @@ public ResponsePackNew BindResidenceMemberAccount(string subAccount, string nickName) { //娣诲姞瀛愯处鍙� - var requestObj = new ChildAddObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.id, account = subAccount, nickName = nickName }; + var requestObj = new ChildAddObj() + { + homeId = DB_ResidenceData.Instance.CurrentRegion.id, + account = subAccount, + nickName = nickName + }; var requestJson = HttpUtil.GetSignRequestJson(requestObj); return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Add, requestJson); + } + //v1.7鏇存柊鎺ュ彛 + public ResponsePackNew BindResidenceMemberAccount(string subAccount, string nickName,string faceUrl) + { + //娣诲姞瀛愯处鍙� + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("nickName", nickName); + if (!string.IsNullOrEmpty(subAccount)) + { + d.Add("account", subAccount); + } + if (!string.IsNullOrEmpty(faceUrl)) + { + d.Add("faceUrl", @"data:image/jpg;base64," + faceUrl); + } + var requestJson = HttpUtil.GetSignRequestJson(d); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Add, requestJson); + } + /// <summary> + /// 鍒犻櫎鎴愬憳璐﹀彿浜鸿劯鏁版嵁 + /// </summary> + /// <param name="subAccount"></param> + /// <param name="nickName"></param> + /// <param name="faceUrl"></param> + /// <returns></returns> + public ResponsePackNew DeleteMemberFace( string childId) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("childId", childId); + var requestJson = HttpUtil.GetSignRequestJson(d); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_RemoveFace, requestJson); + } + /// <summary> + /// 鏇存柊鎴愬憳璐﹀彿浜鸿劯鏁版嵁 + /// </summary> + public ResponsePackNew UpdataMemberFace(string childId, string faceUrl) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("childId", childId); + d.Add("userFace", @"data:image/jpg;base64," + faceUrl); + var requestJson = HttpUtil.GetSignRequestJson(d); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_UpdateFace, requestJson); } /// <summary> @@ -2078,7 +2127,7 @@ /// <param name="productPlatform"></param> /// <param name="productBrand"></param> /// <returns></returns> - public ResponsePackNew IndependentRegister3TyDevcie(string spk, string extDevId, string deviceName, string pairCode = "") + public ResponsePackNew IndependentRegister3TyDevcie(string spk, string extDevId, string deviceName,string productBrandIdentity, string pairCode = "") { Dictionary<string, object> d = new Dictionary<string, object>(); d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); @@ -2086,6 +2135,7 @@ d.Add("extDevId", extDevId); d.Add("name", deviceName); d.Add("code", pairCode); + d.Add("productBrandIdentity", productBrandIdentity); var requestJson = HttpUtil.GetSignRequestJson(d); -- Gitblit v1.8.0