瀏覽代碼

商品分类更新bug修复20240715

ingredientmanage
gwbvipvip 5 月之前
父節點
當前提交
42a3647a10
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsTypeService.cs

+ 3
- 3
BPA.SAAS.Manage.Application/DataBase/Services/GoodsTypeService.cs 查看文件

@@ -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…
取消
儲存