Ver código fonte

商品分类更新bug修复20240715

ingredientmanage
gwbvipvip 5 meses atrás
pai
commit
42a3647a10
1 arquivos alterados com 3 adições e 3 exclusões
  1. +3
    -3
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsTypeService.cs

+ 3
- 3
BPA.SAAS.Manage.Application/DataBase/Services/GoodsTypeService.cs Ver arquivo

@@ -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",


Carregando…
Cancelar
Salvar