充值,提交

This commit is contained in:
zpc 2024-08-28 16:21:35 +08:00
parent 42c9bb973f
commit 8dd9d0ff38

View File

@ -48,7 +48,7 @@ namespace HuanMeng.MiaoYu.WebPayApi.Controllers
//} //}
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost("{tenant?}/{pay?}/{orderId?}/{sign?}")] [HttpPost("{tenant?}/{pay?}/{orderId?}/{sign?}")]
@ -117,15 +117,16 @@ namespace HuanMeng.MiaoYu.WebPayApi.Controllers
orderItems.PayUrl = context.Request.Path; orderItems.PayUrl = context.Request.Path;
//orderItems. //orderItems.
await product.OrderRewardsNoWorkAsync(user, pay, orderId, intentOrder.Price, intentOrder.IntentDate, dao, orderItems); await product.OrderRewardsNoWorkAsync(user, pay, orderId, intentOrder.Price, intentOrder.IntentDate, dao, orderItems);
//intentOrder = await dao.daoDbMiaoYu.context.T_User_IntentOrder.FirstOrDefaultAsync(it => it.OrderId == orderId);
intentOrder.Status = (int)OrderState.; intentOrder.Status = (int)OrderState.;
dao.daoDbMiaoYu.context.SaveChanges();
await dao.daoDbMiaoYu.context.SaveChangesAsync(); await dao.daoDbMiaoYu.context.SaveChangesAsync();
await transaction.CommitAsync();
} }
catch (Exception ex) catch (Exception ex)
{ {
logger.LogError($"请求支付回调接口,发货失败,请求路径: {context.Request.Path}", ex); logger.LogError($"请求支付回调接口,发货失败,请求路径: {context.Request.Path}", ex);
await transaction.RollbackAsync();
intentOrder.Status = (int)OrderState.; intentOrder.Status = (int)OrderState.;
dao.daoDbMiaoYu.context.SaveChanges();
await dao.daoDbMiaoYu.context.SaveChangesAsync(); await dao.daoDbMiaoYu.context.SaveChangesAsync();
redis.KeyDelete(baseKey); redis.KeyDelete(baseKey);
return $"error;出现异常{ex.Message}"; return $"error;出现异常{ex.Message}";