修复bug

This commit is contained in:
18942506660
2023-11-17 15:50:40 +08:00
parent 3bf3e5b938
commit 4957d10ebb

View File

@@ -116,11 +116,10 @@ namespace WMS.Web.Domain.Services
if (isTransaction)
{
isSuccess = _transactionRepositories.CommitTransaction(res_Rollback.IsSuccess ? false : true, _transaction);
if (!res_Rollback.IsSuccess) return res_Rollback;
if (!isSuccess)
return Result.ReFailure(ResultCodes.DateWriteError);
}
if (!res_Rollback.IsSuccess) return res_Rollback;
return Result.ReSuccess();
}
/// <summary>
@@ -161,9 +160,10 @@ namespace WMS.Web.Domain.Services
}
//提交事务
isSuccess = _transactionRepositories.CommitTransaction(res_Rollback.IsSuccess ? false : true, _transaction);
if (!res_Rollback.IsSuccess) return res_Rollback;
if (!isSuccess)
return Result.ReFailure(ResultCodes.DateWriteError);
if (!res_Rollback.IsSuccess) return res_Rollback;
return Result.ReSuccess();
}