fix: 发货失败时所有错误码都进入重试队列

This commit is contained in:
zpc 2026-02-11 00:30:31 +08:00
parent 8991118f8d
commit 4830b57a79

View File

@ -1144,15 +1144,12 @@ public class WechatService : IWechatService
/// </summary>
private static bool ShouldRetry(int errCode)
{
// 以下错误码可以重试
// 40001: access_token无效可能过期
// 发货失败都应该重试,不管什么错误码
// 常见错误码:
// 40001/42001: access_token无效或过期
// -1: 系统繁忙
return errCode switch
{
40001 => true, // access_token无效
-1 => true, // 系统繁忙
42001 => true, // access_token过期
_ => false
};
// 10060001: 支付单不存在(微信系统同步延迟)
// 10060003: 支付单状态异常
return true;
}
}