|
|
@@ -445,7 +445,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services |
|
|
|
var resEntity = new BPA_GoodsType(); |
|
|
|
resEntity.Id = Guid.NewGuid().ToString(); |
|
|
|
resEntity.Name = dto[i].Name; |
|
|
|
resEntity.Pid = dto[i].Pid; |
|
|
|
resEntity.Pid =string.IsNullOrEmpty(dto[i].Pid)?"0": dto[i].Pid; |
|
|
|
resEntity.Sort = dto[i].Sort; |
|
|
|
GoodsTypelist.Add(resEntity); |
|
|
|
} |
|
|
@@ -466,7 +466,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services |
|
|
|
if(model==null) throw Oops.Oh("商品分类不存在"); |
|
|
|
if (dto.Pid == null) dto.Pid = "0"; |
|
|
|
model.Name = dto.Name; |
|
|
|
model.Pid = dto.Pid; |
|
|
|
model.Pid =string.IsNullOrEmpty(dto.Pid)?"0": dto.Pid; |
|
|
|
model.Sort = dto.Sort; |
|
|
|
var res = await SqlSugarDb.Db.Updateable(model).ExecuteCommandAsync(); |
|
|
|
return res > 0; |
|
|
|