ClientFlowInstanceService的bug修复

dev
嵇文龙 2 weeks ago
parent f7953cf8b2
commit 5594d1492f

@ -364,7 +364,7 @@ public class ClientFlowInstanceService : ServiceBase, IClientFlowInstanceService
Content = $"【启动】由{User.UserName}启动该流程。",
UserName = User.UserName
};
Db.Insertable(history).ExecuteCommand();
TenantDb.Insertable(history).ExecuteCommand();
return DataResult.Successed("更新成功!", instance, MultiLanguageConst.FlowInstanceUpdateSuccess);
}
@ -909,9 +909,7 @@ public class ClientFlowInstanceService : ServiceBase, IClientFlowInstanceService
internal async Task<DataResult> WithdrawCoreAsync(List<FlowInstance> instances, string? note = null)
{
ArgumentNullException.ThrowIfNull(instances, nameof(instances));
await TenantDb.Ado.BeginTranAsync();
try
{
await TenantDb.Updateable(instances).UpdateColumns(x => new
{
x.ActivityId,
@ -929,14 +927,6 @@ public class ClientFlowInstanceService : ServiceBase, IClientFlowInstanceService
}).ToList();
await TenantDb.Insertable(historys).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync();
return DataResult.Successed("撤销成功!", MultiLanguageConst.FlowInstanceCancelSuccess);
}
catch (Exception ex)
{
await TenantDb.Ado.RollbackTranAsync();
await ex.LogAsync(Db);
return DataResult.FailedWithDesc(MultiLanguageConst.Operation_Failed);
}
}
}
Loading…
Cancel
Save