From 299cd2204f16db2982ea599106c1ab501ed1b9df Mon Sep 17 00:00:00 2001 From: zhaoy <137053305@qq.com> Date: Mon, 25 Mar 2024 14:26:46 +0800 Subject: [PATCH] z --- .../AExternalPlatform/Service/Goods/Services/GoodsService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs index aba777e..64d8c7e 100644 --- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs +++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs @@ -439,6 +439,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services List GoodsTypelist = new(); for (int i = 0; i < dto.Count; i++) { + if (dto[i].Pid == null) dto[i].Pid = "0"; var resEntity = new BPA_GoodsType(); resEntity.Id = Guid.NewGuid().ToString(); resEntity.Name = dto[i].Name; @@ -461,6 +462,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services { var model=SqlSugarDb.Db.Queryable().Where(x => x.Id == dto.Id).First(); if(model==null) throw Oops.Oh("商品分类不存在"); + if (dto.Pid == null) dto.Pid = "0"; model.Name = dto.Name; model.Pid = dto.Pid; model.Sort = dto.Sort;