From 6c833bd4ee4416cde786cebfca0de6cde4d05930 Mon Sep 17 00:00:00 2001 From: lin5 <1090268920@qq.com> Date: Fri, 12 Jan 2018 12:01:19 +0800 Subject: [PATCH 1/2] Update DBSaveBatchRequestHandler.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复批量保存报空 --- Server/Hotfix/Handler/DBSaveBatchRequestHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Server/Hotfix/Handler/DBSaveBatchRequestHandler.cs b/Server/Hotfix/Handler/DBSaveBatchRequestHandler.cs index e5ea1c93..284b4363 100644 --- a/Server/Hotfix/Handler/DBSaveBatchRequestHandler.cs +++ b/Server/Hotfix/Handler/DBSaveBatchRequestHandler.cs @@ -13,7 +13,7 @@ protected override async void Run(Session session, DBSaveBatchRequest message, A { DBCacheComponent dbCacheComponent = Game.Scene.GetComponent(); - if (message.CollectionName == "") + if (string.IsNullOrEmpty(message.CollectionName) { message.CollectionName = message.Disposers[0].GetType().Name; } @@ -36,4 +36,4 @@ protected override async void Run(Session session, DBSaveBatchRequest message, A } } } -} \ No newline at end of file +} From 3ed1409151263349c7b9b7fe2a81f58afed40956 Mon Sep 17 00:00:00 2001 From: lin5 <1090268920@qq.com> Date: Fri, 12 Jan 2018 12:53:15 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E6=8A=A5=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/Model/Component/DBCacheComponent.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Server/Model/Component/DBCacheComponent.cs b/Server/Model/Component/DBCacheComponent.cs index 0fdd4e30..2545beaf 100644 --- a/Server/Model/Component/DBCacheComponent.cs +++ b/Server/Model/Component/DBCacheComponent.cs @@ -37,7 +37,7 @@ public Task Add(Disposer disposer, string collectionName = "") this.AddToCache(disposer, collectionName); - if (collectionName == "") + if (string.IsNullOrEmpty(collectionName)) { collectionName = disposer.GetType().Name; } @@ -57,7 +57,7 @@ public Task AddBatch(List disposers, string collectionName) public void AddToCache(Disposer disposer, string collectionName = "") { - if (collectionName == "") + if (string.IsNullOrEmpty(collectionName)) { collectionName = disposer.GetType().Name; } @@ -147,4 +147,4 @@ public Task> GetJson(string collectionName, string json) return tcs.Task; } } -} \ No newline at end of file +}