From d87400af518ebc9274f4447f06476959c3aa5102 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 14 七月 2020 16:29:42 +0800
Subject: [PATCH] Merge branch 'dev-tzy' into dev-2020xm

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs |  144 +++++++++++++++++++-----------------------------
 1 files changed, 57 insertions(+), 87 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
index 4244dad..9091b23 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
@@ -5,7 +5,6 @@
 using System.IO;
 using System.Net;
 using System.Text;
-using System.Threading.Tasks;
 using ZigBee.Device;
 
 namespace Shared.Phone.UserCenter
@@ -53,7 +52,7 @@
         /// </summary>
         /// <param name="listDistributedMark"></param>
         /// <returns></returns>
-        private async Task<List<string>> SetShardFileToLocation(List<string> listDistributedMark)
+        private List<string> SetShardFileToLocation(List<string> listDistributedMark)
         {
             if (listDistributedMark.Count == 0)
             {
@@ -63,7 +62,7 @@
 
             List<string> listFile = new List<string>();
             //鏂囦欢澶�
-            string strDir = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory);
+            string strDir = DirNameResourse.DownLoadShardDirectory;
 
             //涓嶅厑璁告寜绯荤粺鐨勮繑鍥為敭
             Shared.Common.CommonPage.BackKeyCanClick = false;
@@ -73,8 +72,8 @@
             {
                 string keys = listDistributedMark[i];
                 var dataPra = new { DistributedMark = keys, HouseDistributedMark = Common.Config.Instance.Home.Id, IsOtherAccountControl = Common.Config.Instance.Home.IsOthreShare };
-                var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetOneShareData", false, dataPra);
-                if (result == null)
+                var result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetOneShareData", false, dataPra, null, true);
+                if (string.IsNullOrEmpty(result) == true)
                 {
                     //鍏佽鎸夌郴缁熺殑杩斿洖閿�
                     Shared.Common.CommonPage.BackKeyCanClick = true;
@@ -85,7 +84,7 @@
                 //鏂囦欢鍚嶅瓧
                 listFile.Add(dataResult.ShareName);
                 //淇濆瓨鍒版寚瀹氭枃浠跺す涓�
-                Global.WriteFileToDirectoryByBytes(strDir, dataResult.ShareName, dataResult.ShareDataBytes);
+                HdlFileLogic.Current.SaveTextToFile(System.IO.Path.Combine(strDir, dataResult.ShareName), System.Text.Encoding.UTF8.GetString(dataResult.ShareDataBytes));
                 //璁剧疆杩涘害鍊�
                 ProgressFormBar.Current.SetValue(i + 1, listMarkCount);
             }
@@ -104,13 +103,13 @@
         /// <returns></returns>
         public byte[] GetShardFileContent(string fileName)
         {
-            string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, fileName);
+            string fullName = System.IO.Path.Combine(DirNameResourse.DownLoadShardDirectory, fileName);
             if (System.IO.File.Exists(fullName) == false)
             {
                 return null;
             }
-            string path = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory);
-            var varByte = Global.ReadFileByDirectory(path, fileName);
+            string path = System.IO.Path.Combine(DirNameResourse.DownLoadShardDirectory, fileName);
+            var varByte = HdlFileLogic.Current.ReadFileByteContent(path);
             return varByte;
         }
 
@@ -120,10 +119,7 @@
         /// <returns></returns>
         public List<string> GetLocalAllShardFile()
         {
-            string path = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory);
-            var listFile = HdlAutoBackupLogic.GetFileFromDirectory(path);
-
-            return listFile;
+            return HdlFileLogic.Current.GetFileFromDirectory(DirNameResourse.DownLoadShardDirectory);
         }
 
         /// <summary>
@@ -133,7 +129,7 @@
         /// <returns></returns>
         public bool IsFileExists(string fileName)
         {
-            string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, fileName);
+            string fullName = System.IO.Path.Combine(DirNameResourse.DownLoadShardDirectory, fileName);
             if (System.IO.File.Exists(fullName) == false)
             {
                 return false;
@@ -155,9 +151,9 @@
             {
                 return;
             }
-            string oldName = UserCenterLogic.CombinePath(fileName);
-            string newName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, fileName);
-            System.IO.File.Copy(oldName, newName, true);
+            string oldName = System.IO.Path.Combine(Config.Instance.FullPath, fileName);
+            string newName = System.IO.Path.Combine(DirNameResourse.DownLoadShardDirectory, fileName);
+            HdlFileLogic.Current.CopyFile(oldName, newName);
         }
 
         /// <summary>
@@ -167,12 +163,9 @@
         public void AddShardFile(Common.Room room)
         {
             room.IsSharedRoom = true;
-            var data = Newtonsoft.Json.JsonConvert.SerializeObject(room);
-            var byteData = System.Text.Encoding.UTF8.GetBytes(data);
-
-            string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, room.FileName);
+            string fullName = System.IO.Path.Combine(DirNameResourse.DownLoadShardDirectory, room.FileName);
             //鍐欏叆鍐呭
-            Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData);
+            HdlFileLogic.Current.SaveFileContent(fullName, room);
         }
 
         /// <summary>
@@ -182,12 +175,9 @@
         public void AddShardFile(Common.SceneUI scene)
         {
             scene.IsSharedScene = true;
-            var data = Newtonsoft.Json.JsonConvert.SerializeObject(scene);
-            var byteData = System.Text.Encoding.UTF8.GetBytes(data);
-
-            string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, scene.FileName);
+            string fullName = System.IO.Path.Combine(DirNameResourse.DownLoadShardDirectory, scene.FileName);
             //鍐欏叆鍐呭
-            Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData);
+            HdlFileLogic.Current.SaveFileContent(fullName, scene);
         }
 
         /// <summary>
@@ -196,12 +186,9 @@
         /// <param name="dic">妤煎眰</param>
         public void AddShardFile(Dictionary<string, string> dic)
         {
-            var data = Newtonsoft.Json.JsonConvert.SerializeObject(dic);
-            var byteData = System.Text.Encoding.UTF8.GetBytes(data);
-
-            string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, DirNameResourse.ShardFloorFile);
+            string fullName = System.IO.Path.Combine(DirNameResourse.DownLoadShardDirectory, DirNameResourse.ShardFloorFile);
             //鍐欏叆鍐呭
-            Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData);
+            HdlFileLogic.Current.SaveFileContent(fullName, dic);
         }
 
         #endregion
@@ -214,11 +201,8 @@
         /// <param name="fileName">鎸囧畾鏂囦欢鍚嶅瓧</param>
         public void DeleteShardFile(string fileName)
         {
-            fileName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, fileName);
-            if (System.IO.File.Exists(fileName) == true)
-            {
-                System.IO.File.Delete(fileName);
-            }
+            fileName = System.IO.Path.Combine(DirNameResourse.DownLoadShardDirectory, fileName);
+            HdlFileLogic.Current.DeleteFile(fileName);
         }
 
         /// <summary>
@@ -228,8 +212,7 @@
         {
             this.dicShardDeviceFile.Clear();
             //鍒涘缓鏂囦欢澶�
-            string strDir = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory);
-            Global.CreateEmptyDirectory(strDir, true);
+            HdlFileLogic.Current.CreateDirectory(DirNameResourse.DownLoadShardDirectory, true);
         }
 
         #endregion
@@ -239,7 +222,7 @@
         /// <summary>
         /// 鍚屾鏈嶅姟鍣ㄧ殑鍒嗕韩鍐呭(閲岄潰鍙礋璐f妸涓滆タ瀛樺叆鏈湴)
         /// </summary>
-        public async Task<bool> SynchronizeDbSharedContent()
+        public bool SynchronizeDbSharedContent()
         {
             if (UserCenterResourse.UserInfo.AuthorityNo != 3)
             {
@@ -249,8 +232,7 @@
 
             //鑾峰彇涓讳汉鍒嗕韩缁欐垚鍛樼殑鏂囦欢鍒楄〃
             var infoPra = new { DistributedMark = Config.Instance.Guid, HouseDistributedMark = Common.Config.Instance.Home.Id, IsOtherAccountControl = Common.Config.Instance.Home.IsOthreShare };
-            var listNotShow = new List<string>() { "NotSetAgain" };
-            var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra, listNotShow);
+            var result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra);
             if (string.IsNullOrEmpty(result) == true)
             {
                 return false;
@@ -291,7 +273,7 @@
 
                 //灏嗗垎浜殑鏁版嵁瀛樺叆鏈湴(鑾峰彇鐨勬槸鏈湴娌℃湁鐨�)
                 this.ClearShardDirectory();
-                var listDbFile = await this.SetShardFileToLocation(listAddMark);
+                var listDbFile = this.SetShardFileToLocation(listAddMark);
                 if (listDbFile == null)
                 {
                     //鍏抽棴
@@ -302,22 +284,16 @@
                 //鐢熸垚鏂囦欢
                 foreach (string fileName in listDbFile)
                 {
-                    var oldPath = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, fileName);
+                    var oldPath = System.IO.Path.Combine(DirNameResourse.DownLoadShardDirectory, fileName);
                     var newPath = System.IO.Path.Combine(Config.Instance.FullPath, fileName);
-                    System.IO.File.Copy(oldPath, newPath, true);
-
-                    if (fileName.StartsWith("Room_") == true)
-                    {
-                        //鎴块棿鏂囦欢鐗规畩澶勭悊
-                        Config.Instance.Home.AddRoomId(fileName.Replace("Room_", string.Empty).Replace(".json", string.Empty));
-                    }
+                    HdlFileLogic.Current.CopyFile(oldPath, newPath);
                 }
                 //娓呯┖鍏变韩鏂囦欢澶�
                 this.ClearShardDirectory();
             }
 
             //鍚屾鏈嶅姟鍣ㄧ殑鍙栨秷浜嗙殑鍒嗕韩鍐呭
-            return await this.SynchronizeDeleteSharedContent(listShardFile, dicUpdateTime);
+            return this.SynchronizeDeleteSharedContent(listShardFile, dicUpdateTime);
         }
 
         /// <summary>
@@ -326,7 +302,7 @@
         /// <param name="listShardFile">浜戠涓婇潰鍒嗕韩鐨勬枃浠�,涓篘ull鏃朵粠鏂拌幏鍙�</param>
         /// <param name="dicUpdateTime">鍒嗕韩鏂囦欢鐨勬洿鏂版椂闂�,涓篘ull鏃朵粠鏂拌幏鍙�</param>
         /// <returns></returns>
-        public async Task<bool> SynchronizeDeleteSharedContent(HashSet<string> listShardFile = null, Dictionary<string, string> dicUpdateTime = null)
+        public bool SynchronizeDeleteSharedContent(HashSet<string> listShardFile = null, Dictionary<string, string> dicUpdateTime = null)
         {
             if (UserCenterResourse.UserInfo.AuthorityNo != 3)
             {
@@ -349,8 +325,7 @@
                 listShardFile = new HashSet<string>();
                 //鑾峰彇涓讳汉鍒嗕韩缁欐垚鍛樼殑鏂囦欢鍒楄〃
                 var infoPra = new { DistributedMark = Config.Instance.Guid, HouseDistributedMark = Common.Config.Instance.Home.Id, IsOtherAccountControl = Common.Config.Instance.Home.IsOthreShare };
-                var listNotShow = new List<string>() { "NotSetAgain" };
-                var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra, listNotShow);
+                var result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra);
                 if (string.IsNullOrEmpty(result) == true)
                 {
                     //鍏抽棴
@@ -368,7 +343,7 @@
             //娓呯┖妤煎眰鏁版嵁
             Common.Config.Instance.Home.FloorDics.Clear();
             //鐒跺悗妫�娴嬫湰鍦扮殑鏂囦欢
-            var listLocalFile = Global.FileListByHomeId();
+            var listLocalFile = HdlFileLogic.Current.GetRootPathListFile();
             foreach (string fileName in listLocalFile)
             {
                 if (fileName == DirNameResourse.ShardFloorFile)
@@ -408,8 +383,6 @@
                     //鍒犻櫎鎺夎繖涓埧闂存枃浠�
                     Global.DeleteFilebyHomeId(fileName);
                     dicUpdateTime.Remove(fileName);
-
-                    Config.Instance.Home.RemoveRoomId(nowRoom.Id);
                 }
                 //妫�娴嬫湰鍦板満鏅枃浠�,鏄惁瀛樺湪宸茬粡鍙栨秷浜嗗叡浜簡鐨�
                 else if (fileName.StartsWith("Scene_") == true)
@@ -451,7 +424,7 @@
         private Dictionary<string, string> GetAllShardFileAgoUpdateTime()
         {
             var dicTime = new Dictionary<string, string>();
-            var data = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.ShardFileUpdateTimeFile);
+            var data = HdlFileLogic.Current.ReadFileByteContent(DirNameResourse.ShardFileUpdateTimeFile);
             if (data == null)
             {
                 //鐩爣鏂囦欢涓嶅瓨鍦�
@@ -467,9 +440,7 @@
         /// <param name="dicTime"></param>
         private void SaveAllShardFileAgoUpdateTime(Dictionary<string, string> dicTime)
         {
-            var data = Newtonsoft.Json.JsonConvert.SerializeObject(dicTime);
-            var byteData = System.Text.Encoding.UTF8.GetBytes(data);
-            Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.ShardFileUpdateTimeFile, byteData);
+            HdlFileLogic.Current.SaveFileContent(DirNameResourse.ShardFileUpdateTimeFile, dicTime);
         }
 
         #endregion
@@ -487,7 +458,7 @@
         /// <para>New鐨勬椂鍊欒寰楀SubAccountDistributedMark璧嬪��,瀹冩槸鎴愬憳鍒楄〃鎺ュ彛杩斿洖鐨凷ubAccountDistributedMark</para>
         /// </param>
         /// <returns></returns>
-        public async Task<bool> GetMemberShardContentListAndSetToLocation(MemberShardInfoData memberShardInfo)
+        public bool GetMemberShardContentListAndSetToLocation(MemberShardInfoData memberShardInfo)
         {
             if (memberShardInfo.Refresh == false)
             {
@@ -507,8 +478,8 @@
                 HouseDistributedMark = Shared.Common.Config.Instance.HomeId,
                 IsOtherAccountControl = Common.Config.Instance.Home.IsOthreShare
             };
-            var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra);
-            if (result == null)
+            var result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra);
+            if (string.IsNullOrEmpty(result) == true)
             {
                 //鍏抽棴杩涘害鏉�
                 ProgressFormBar.Current.Close();
@@ -542,7 +513,7 @@
             }
 
             //灏嗗垎浜殑鏁版嵁瀛樺叆鏈湴,杩斿洖鐨勬槸鏂囦欢鍚嶅瓧(寮傚父鏃惰繑鍥瀗ull)
-            var listFile = await this.SetShardFileToLocation(listMark);
+            var listFile = this.SetShardFileToLocation(listMark);
             if (listFile == null)
             {
                 //鍏抽棴杩涘害鏉�
@@ -736,7 +707,7 @@
         /// <param name="listScene">閫夋嫨涓婁紶鐨勫満鏅�(涓嶈鑾峰彇瀹冮噷闈㈢殑缁戝畾鍒楄〃)</param>
         /// <param name="BarMaxValue">杩涘害鏉$殑鏈�澶у��,濡傛灉涓嶄负-1,鍒欏唴閮ㄤ笉浼氳嚜鍔ㄥ脊鍑鸿繘搴︽潯</param>
         /// <param name="listCheckFile">鏂囦欢閲嶅涓婁紶妫�娴�</param>
-        public async Task<bool> DoUploadSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom,
+        public bool DoUploadSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom,
             List<CommonDevice> listDevice, List<Common.SceneUI> listScene, int BarMaxValue = -1, HashSet<string> listCheckFile = null)
         {
             if (listDevice.Count == 0 && listScene.Count == 0)
@@ -790,11 +761,11 @@
             }
 
             //涓婁紶鍒嗕韩
-            var result = await this.DoUploadShardContent(memberShardInfo, listFile, listCheckFile);
+            var result = this.DoUploadShardContent(memberShardInfo, listFile, listCheckFile);
             if (result == true)
             {
                 //鍒犻櫎鎸囧畾鑷畾涔夊浘鐗�
-                result = await this.DoDeleteSharedContent(memberShardInfo, listDelPic);
+                result = this.DoDeleteSharedContent(memberShardInfo, listDelPic);
             }
             if (BarMaxValue == -1)
             {
@@ -1008,7 +979,7 @@
         /// <param name="listFile">涓婁紶鐨勬枃浠跺悕</param>
         /// <param name="listCheckFile">閲嶅鏂囦欢涓婁紶妫�娴�</param>
         /// <returns></returns>
-        private async Task<bool> DoUploadShardContent(MemberShardInfoData memberShardInfo, List<string> listFile, HashSet<string> listCheckFile)
+        private bool DoUploadShardContent(MemberShardInfoData memberShardInfo, List<string> listFile, HashSet<string> listCheckFile)
         {
             var dicKeys = new Dictionary<string, string>();
             for (int i = 0; i < listFile.Count; i++)
@@ -1043,8 +1014,8 @@
                     //杩藉姞鍏变韩
                     if (memberShardInfo.dicAllShardKeys.ContainsKey(fileName) == false)
                     {
-                        var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/AddShareData", false, info);
-                        if (result == null)
+                        var result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/AddShareData", false, info, null, true);
+                        if (string.IsNullOrEmpty(result) == true)
                         {
                             return false;
                         }
@@ -1054,7 +1025,7 @@
                     else
                     {
                         info.DistributedMark = memberShardInfo.dicAllShardKeys[fileName];
-                        var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info);
+                        var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info, null, true);
                         if (result == false)
                         {
                             return false;
@@ -1082,7 +1053,7 @@
         /// <returns></returns>
         private string UpLoadBigBackupFileToDB(MemberShardInfoData memberShardInfo, string fileName)
         {
-            string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, fileName);
+            string fullName = System.IO.Path.Combine(DirNameResourse.DownLoadShardDirectory, fileName);
             if (System.IO.File.Exists(fullName) == false)
             {
                 return null;
@@ -1275,7 +1246,7 @@
         /// <param name="listDevice">瑕佸彇娑堢殑璁惧</param>
         /// <param name="listSceneUI">瑕佸彇娑堢殑鍦烘櫙</param>
         /// <returns></returns>
-        public async Task<bool> DoDeleteSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom,
+        public bool DoDeleteSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom,
             List<CommonDevice> listDevice, List<SceneUI> listSceneUI)
         {
             var roomTemp = memberShardInfo.dicShardRoom[nowRoom.FileName];
@@ -1312,7 +1283,6 @@
                 }
                 listDeleteFile.Add(device.FilePath);
             }
-
             //鍐嶅紕鍦烘櫙
             foreach (var sceneUI in listSceneUI)
             {
@@ -1404,12 +1374,12 @@
             }
 
             //鎵ц绉婚櫎鍒嗕韩鏁版嵁
-            var result = await this.DoDeleteSharedContent(memberShardInfo, nowRoom, listMark, listDeleteFile);
+            var result = this.DoDeleteSharedContent(memberShardInfo, nowRoom, listMark, listDeleteFile);
             //鍚屾鎴块棿鏂囦欢
             if (result == true && listDeleteFile.Contains(roomTemp.FileName) == false)
             {
                 //鎵ц涓婁紶鎴块棿瀵硅薄
-                result = await this.DoUploadRoomObject(memberShardInfo, roomTemp);
+                result = this.DoUploadRoomObject(memberShardInfo, roomTemp);
             }
             //鍚屾妤煎眰鏁版嵁
             if (result == true && listDeleteFile.Contains(roomTemp.FileName) == true)
@@ -1428,7 +1398,7 @@
                     //濡傛灉璇ユゼ灞傚凡缁忓垹瀹屾埧闂翠簡,鍒欐洿鏂版ゼ灞�
                     memberShardInfo.dicShardFloor.Remove(roomTemp.FloorId);
                     //鎵ц涓婁紶瀵硅薄
-                    result = await this.DoUploadFloorObject(memberShardInfo);
+                    result = this.DoUploadFloorObject(memberShardInfo);
                 }
             }
 
@@ -1456,7 +1426,7 @@
         /// <param name="listMark">瑕佺Щ闄ょ殑涓婚敭</param>
         /// <param name="listDeleteFile">瑕佸垹闄ょ殑鏂囦欢(鎴块棿鏂囦欢闇�瑕佸垹闄ょ殑璇�,蹇呴』鏀惧湪鏈�鍚�)</param>
         /// <returns></returns>
-        private async Task<bool> DoDeleteSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom,
+        private bool DoDeleteSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom,
             List<string> listMark, List<string> listDeleteFile)
         {
             if (listMark.Count == 0)
@@ -1477,7 +1447,7 @@
 
                 info.DistributedMark = markKeys;
                 //鎵ц鍒犻櫎
-                var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/DeleteShareData", false, info);
+                var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/DeleteShareData", false, info, null, true);
                 if (result == false)
                 {
                     //鍏抽棴杩涘害鏉�
@@ -1508,7 +1478,7 @@
         /// <param name="memberShardInfo">鎴愬憳鐨勫垎浜唴瀹�</param>
         /// <param name="listDelFile">鍒犻櫎鐨勬枃浠�</param>
         /// <returns></returns>
-        private async Task<bool> DoDeleteSharedContent(MemberShardInfoData memberShardInfo, List<string> listDelFile)
+        private bool DoDeleteSharedContent(MemberShardInfoData memberShardInfo, List<string> listDelFile)
         {
             if (listDelFile.Count == 0)
             {
@@ -1526,7 +1496,7 @@
 
                 info.DistributedMark = memberShardInfo.dicAllShardKeys[fileName];
                 //鎵ц鍒犻櫎
-                var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/DeleteShareData", false, info);
+                var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/DeleteShareData", false, info, null, true);
                 if (result == false)
                 {
                     return false;
@@ -1552,7 +1522,7 @@
         /// <param name="memberShardInfo">鎴愬憳鐨勫叡浜唴瀹�</param>
         /// <param name="upDateRoom">闇�瑕佷笂浼犲埌浜戠鐨勬埧闂村璞�</param>
         /// <returns></returns>
-        private async Task<bool> DoUploadRoomObject(MemberShardInfoData memberShardInfo, Common.Room upDateRoom)
+        private bool DoUploadRoomObject(MemberShardInfoData memberShardInfo, Common.Room upDateRoom)
         {
             if (upDateRoom.Id == "Other")
             {
@@ -1566,7 +1536,7 @@
             var data = Newtonsoft.Json.JsonConvert.SerializeObject(upDateRoom);
             var byteData = System.Text.Encoding.UTF8.GetBytes(data);
             info.ShareDataBytes = byteData;
-            var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info);
+            var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info, null, true);
             if (result == false)
             {
                 return false;
@@ -1586,7 +1556,7 @@
         /// </summary>
         /// <param name="memberShardInfo">鎴愬憳鐨勫叡浜唴瀹�</param>
         /// <returns></returns>
-        private async Task<bool> DoUploadFloorObject(MemberShardInfoData memberShardInfo)
+        private bool DoUploadFloorObject(MemberShardInfoData memberShardInfo)
         {
             var info = new EditorShardContent();
             info.DistributedMark = memberShardInfo.dicAllShardKeys[DirNameResourse.ShardFloorFile];
@@ -1596,7 +1566,7 @@
             var data = Newtonsoft.Json.JsonConvert.SerializeObject(memberShardInfo.dicShardFloor);
             var byteData = System.Text.Encoding.UTF8.GetBytes(data);
             info.ShareDataBytes = byteData;
-            var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info);
+            var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info, null, true);
             if (result == false)
             {
                 return false;

--
Gitblit v1.8.0