Browse Source

商品分类更新bug修复20240715

ingredientmanage
gwbvipvip 5 months ago
parent
commit
42a3647a10
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsTypeService.cs

+ 3
- 3
BPA.SAAS.Manage.Application/DataBase/Services/GoodsTypeService.cs View File

@@ -93,13 +93,13 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
{
try
{
var old = await _db.Queryable<BPA_GoodsType>().FirstAsync(t => t.Name == dto.Name);
if (old != null)
throw Oops.Oh($"已存在{dto.Name},添加失败!");
var res = 0;
if (string.IsNullOrWhiteSpace(dto.Id))
{
_db.Ado.BeginTran();
var old = await _db.Queryable<BPA_GoodsType>().FirstAsync(t => t.Name == dto.Name);
if (old != null)
throw Oops.Oh($"已存在{dto.Name},添加失败!");
var newType = new BPA_GoodsType
{
Pid = dto.Pid ?? "0",


Loading…
Cancel
Save