diff --git a/ZR.Service/System/SysDictService.cs b/ZR.Service/System/SysDictService.cs index ba218972498d675b5fe1c02f07b4e29f162a65a6..f6155dfc19734210bd9cc4575d7078a64941c877 100644 --- a/ZR.Service/System/SysDictService.cs +++ b/ZR.Service/System/SysDictService.cs @@ -1,4 +1,4 @@ -using Infrastructure; +using Infrastructure; using Infrastructure.Attribute; using System.Collections.Generic; using System.Text; @@ -63,7 +63,7 @@ namespace ZR.Service.System foreach (var dictId in dictIds) { SysDictType dictType = DictRepository.GetFirst(x => x.DictId == dictId); - if (DictRepository.Count(f => f.DictType == dictType.DictType) > 0) + if (SysDictDataRepository.Count(f => f.DictType == dictType.DictType) > 0) { throw new CustomException($"{dictType.DictName}已分配,不能删除"); }