diff --git a/src/2-api/HuanMeng.MiaoYu.WebPayApi/Controllers/PayController.cs b/src/2-api/HuanMeng.MiaoYu.WebPayApi/Controllers/PayController.cs
index 4a311db..eaab7d2 100644
--- a/src/2-api/HuanMeng.MiaoYu.WebPayApi/Controllers/PayController.cs
+++ b/src/2-api/HuanMeng.MiaoYu.WebPayApi/Controllers/PayController.cs
@@ -48,7 +48,7 @@ namespace HuanMeng.MiaoYu.WebPayApi.Controllers
//}
///
- /// ${tenant}/zfb/${orderId} http://localhost:90/api/Pay/default/wx/WX0T1724769806U000002P001M001RLZ/c2e0468ed21e79ebb4f3164b2a3209ac
+ ///
///
///
[HttpPost("{tenant?}/{pay?}/{orderId?}/{sign?}")]
@@ -76,7 +76,7 @@ namespace HuanMeng.MiaoYu.WebPayApi.Controllers
var redis = RedisConnection.GetRedis(appConfig);
if (!redis.StringSetLock(baseKey, "", 10))
{
- return "error;重复请求";
+ return "success";
}
var temantInfo = serviceProvider.GetRequiredService();
appConfig.ToITenantInfo(temantInfo);
@@ -90,7 +90,7 @@ namespace HuanMeng.MiaoYu.WebPayApi.Controllers
if (intentOrder.Status != (int)OrderState.已下单)
{
redis.KeyDelete(baseKey);
- return $"error;订单{((OrderState)intentOrder.Status).ToString()}";
+ return $"success";
}
intentOrder.Status = (int)OrderState.正在发货;
await dao.daoDbMiaoYu.context.SaveChangesAsync();
@@ -123,10 +123,11 @@ namespace HuanMeng.MiaoYu.WebPayApi.Controllers
}
catch (Exception ex)
{
+ logger.LogError($"请求支付回调接口,发货失败,请求路径: {context.Request.Path}", ex);
intentOrder.Status = (int)OrderState.发货失败;
dao.daoDbMiaoYu.context.SaveChanges();
- logger.LogError($"请求支付回调接口,发货失败,请求路径: {context.Request.Path}", ex);
await dao.daoDbMiaoYu.context.SaveChangesAsync();
+ redis.KeyDelete(baseKey);
return $"error;出现异常{ex.Message}";
}
}