From 454d65cd5c39cf531023216aaa98e9ebe31007cc Mon Sep 17 00:00:00 2001 From: v03413 Date: Thu, 28 Aug 2025 21:20:54 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=A2=9E=E5=8A=A0=E7=AD=89=E5=BE=85?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=97=B6=E4=BA=A6=E5=8F=AF=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E5=B7=B2=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 实际使用过程中,在等待付款这个阶段其实就可能发现客户错付,即可直接标记成功直接回调。 --- app/bot/callback.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/bot/callback.go b/app/bot/callback.go index b633e75..f822fe3 100644 --- a/app/bot/callback.go +++ b/app/bot/callback.go @@ -4,6 +4,13 @@ import ( "bytes" "context" "fmt" + "io" + "math/big" + "net/http" + "net/url" + "strings" + "time" + "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" "github.com/shopspring/decimal" @@ -15,12 +22,6 @@ import ( "github.com/v03413/bepusdt/app/model" "github.com/v03413/go-cache" "gorm.io/gorm" - "io" - "math/big" - "net/http" - "net/url" - "strings" - "time" ) const cbWallet = "wallet" @@ -292,7 +293,7 @@ func cbOrderDetailAction(ctx context.Context, b *bot.Bot, u *models.Update) { }) } - if order.Status == model.OrderStatusExpired && order.NotifyState == model.OrderNotifyStateFail { + if (order.Status == model.OrderStatusExpired || order.Status == model.OrderStatusWaiting) && order.NotifyState == model.OrderNotifyStateFail { markup.InlineKeyboard = append(markup.InlineKeyboard, []models.InlineKeyboardButton{ {Text: "⚠️直接标记已支付(即使未收到款)", CallbackData: cbMarkOrderSucc + "|" + order.TradeId}, })