From 67f41bd1396a9805f1fe005b89979651aacf8e31 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 15 Apr 2022 09:15:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E8=A1=A8=E6=9B=B4=E6=96=B0bu?= =?UTF-8?q?g=20=E6=9A=82=E6=97=B6=E8=A7=A3=E5=86=B3=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Common/DictionaryService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs index de7f053be..7ca8b2ea5 100644 --- a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs +++ b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs @@ -63,7 +63,7 @@ namespace IRaCIS.Application.Services { var entity = await _dicRepository.InsertDictionaryAsync(addOrEditBasic); - await _dicRepository.UpdateFromQueryAsync(t => t.ParentId == Guid.Empty, + await _dicRepository.UpdateFromQueryAsync(t => t.ParentId == Guid.Empty, u => new Dictionary() { ParentId = null }); return ResponseOutput.Ok(entity.Id.ToString()); @@ -71,6 +71,9 @@ namespace IRaCIS.Application.Services else { var entity = await _dicRepository.InsertOrUpdateAsync(addOrEditBasic, true); + await _dicRepository.UpdateFromQueryAsync(t => t.ParentId == Guid.Empty, + u => new Dictionary() { ParentId = null }); + return ResponseOutput.Ok(entity.Id.ToString()); } //var entity = await _dicRepository.InsertOrUpdateAsync(addOrEditBasic, true);