更新 .tool-versions 文件,将 Golang 版本从 1.24.2 升级至 1.24.3;在 eggplant.go 文件中,新增对特定订单状态的处理逻辑,增强错误处理能力,提升系统稳定性。
This commit is contained in:
@@ -1 +1 @@
|
||||
golang 1.24.2
|
||||
golang 1.24.3
|
||||
|
||||
@@ -22,6 +22,7 @@ import (
|
||||
"slices"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/beego/beego/v2/client/httplib"
|
||||
@@ -195,7 +196,9 @@ func (c *eggplantProductCode) channelTwo(ctx context.Context, forwardUrl *url.UR
|
||||
if respData.Code == 500 && respData.Msg == "订单不可用" {
|
||||
return true, fmt.Sprintf("%s,按照订单正常处理", respData.Msg), ""
|
||||
}
|
||||
|
||||
if respData.Code == 1 && strings.Contains(respData.Msg, "该订单号") && strings.Contains(respData.Msg, "已成功") {
|
||||
return true, fmt.Sprintf("%s,按照订单正常处理", respData.Msg), ""
|
||||
}
|
||||
if respData.Code != 0 {
|
||||
return false, respData.Msg, ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user