【修复】修复编辑商品扩展分类存在未清除历史扩展分类的情况。

This commit is contained in:
jianweie code
2023-08-30 01:28:41 +08:00
parent 8877a6f407
commit d9450d4f8f

View File

@@ -452,9 +452,9 @@ namespace CoreCms.Net.Repository
var bl = await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync();
if (bl)
{
bl = await DbClient.Deleteable<CoreCmsGoodsCategoryExtend>().Where(p => p.goodsId == model.id).ExecuteCommandHasChangeAsync();
if (!string.IsNullOrEmpty(entity.goodsCategoryExtendIds))
{
bl = await DbClient.Deleteable<CoreCmsGoodsCategoryExtend>().Where(p => p.goodsId == model.id).ExecuteCommandHasChangeAsync();
var ids = CommonHelper.StringToIntArray(entity.goodsCategoryExtendIds);
if (ids.Any())
{