修改批量删除字典数据信息问题

This commit is contained in:
不做码农 2022-03-15 15:52:58 +08:00
parent a97c647b91
commit 22ba88a92c

View File

@ -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 (DictDataRepository.Count(f => f.DictType == dictType.DictType) > 0)
{
throw new CustomException($"{dictType.DictName}已分配,不能删除");
}