From a3313818a548d51777ae4e6cc006e9d1e2c1036e Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 07 四月 2023 09:15:37 +0800
Subject: [PATCH] 群控备份

---
 HDL_ON/DAL/Server/HttpServerRequest.cs |   76 ++++++++++++++++++++++++++++++++++++-
 1 files changed, 73 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 0ae1596..6054436 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -3206,7 +3206,7 @@
         /// <summary>
         /// 鑾峰彇缇ゆ帶璇︽儏
         /// </summary>
-        public ResponsePackNew GetGroupControInfo(String userDeviceGroupControlIds)
+        public ResponsePackNew GetGroupControInfo(string userDeviceGroupControlIds)
         {
             Dictionary<string, object> d = new Dictionary<string, object>();
             d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
@@ -3221,10 +3221,21 @@
         }
 
         /// <summary>
+        /// 鑾峰彇缇ゆ帶璇︽儏
+        /// </summary>
+        public ResponsePackNew GetGroupControInfo(List<string> ids)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("userDeviceGroupControlIds", ids);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlInfos, requestJson);
+            return pack;
+        }
+
+        /// <summary>
         /// 娣诲姞缇ゆ帶鍒楄〃
         /// </summary>
-        /// <param name="spk"></param>
-        /// <returns></returns>
         public ResponsePackNew AddGroupControl(List<GroupControl> groupControls)
         {
             Dictionary<string, object> d = new Dictionary<string, object>();
@@ -3233,6 +3244,20 @@
             d.Add("infos", groupControls);
             var requestJson = HttpUtil.GetSignRequestJson(d);
             var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_AddGroupControl, requestJson);
+            return pack;
+        }
+
+
+        /// <summary>
+        /// 娣诲姞缇ゆ帶鍒楄〃
+        /// </summary>
+        public ResponsePackNew DelGroupControl(string groupControlId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("userDeviceGroupControlIds", new List<string>() { groupControlId });
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteGroupControl, requestJson);
             return pack;
         }
 
@@ -3251,6 +3276,51 @@
             return pack;
         }
 
+
+        /// <summary>
+        /// 缇ゆ帶鎺у埗
+        /// </summary>
+        public ResponsePackNew ControlGroupControl(string userDeviceGroupControlId, Dictionary<string, object> pair)
+        {
+            var d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("userDeviceGroupControlId", userDeviceGroupControlId);
+            List<Dictionary<string, object>> dd = new List<Dictionary<string, object>>();
+            dd.Add(pair);
+            d.Add("status",dd);
+
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_ControlGroupControl, requestJson);
+            return pack;
+        }
+
+        /// <summary>
+        /// 鏀惰棌缇ゆ帶
+        /// </summary>
+        public ResponsePackNew CollectGroupControl(string groupControlId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("userDeviceGroupControlIds", new List<string>() { groupControlId });
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CollectGroupControl, requestJson);
+            return pack;
+        }
+
+
+        /// <summary>
+        /// 鍙栨秷鏀惰棌缇ゆ帶
+        /// </summary>
+        public ResponsePackNew CancelCollectGroupControl(string groupControlId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("userDeviceGroupControlIds", new List<string>() { groupControlId });
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CancelCollectGroupControl, requestJson);
+            return pack;
+        }
+
         #endregion
 
     }

--
Gitblit v1.8.0