mirror of
https://github.com/GMWalletApp/epusdt.git
synced 2026-07-07 18:26:16 +00:00
更新carbon依赖
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/assimon/luuu/mq/handle"
|
||||
"github.com/assimon/luuu/util/constant"
|
||||
"github.com/assimon/luuu/util/math"
|
||||
"github.com/golang-module/carbon/v2"
|
||||
"github.com/dromara/carbon/v2"
|
||||
"github.com/hibiken/asynq"
|
||||
"github.com/shopspring/decimal"
|
||||
"math/rand"
|
||||
|
||||
@@ -2,6 +2,7 @@ package service
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/assimon/luuu/config"
|
||||
"github.com/assimon/luuu/model/data"
|
||||
"github.com/assimon/luuu/model/mdb"
|
||||
@@ -21,7 +22,7 @@ func GetCheckoutCounterByTradeId(tradeId string) (*response.CheckoutCounterRespo
|
||||
TradeId: orderInfo.TradeId,
|
||||
ActualAmount: orderInfo.ActualAmount,
|
||||
Token: orderInfo.Token,
|
||||
ExpirationTime: orderInfo.CreatedAt.AddMinutes(config.GetOrderExpirationTime()).TimestampWithMillisecond(),
|
||||
ExpirationTime: orderInfo.CreatedAt.AddMinutes(config.GetOrderExpirationTime()).TimestampMilli(),
|
||||
RedirectUrl: orderInfo.RedirectUrl,
|
||||
}
|
||||
return resp, nil
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/assimon/luuu/util/http_client"
|
||||
"github.com/assimon/luuu/util/json"
|
||||
"github.com/assimon/luuu/util/log"
|
||||
"github.com/golang-module/carbon/v2"
|
||||
"github.com/dromara/carbon/v2"
|
||||
"github.com/gookit/goutil/stdutil"
|
||||
"github.com/hibiken/asynq"
|
||||
"github.com/shopspring/decimal"
|
||||
@@ -72,8 +72,8 @@ func Trc20CallBack(token string, wg *sync.WaitGroup) {
|
||||
}
|
||||
}()
|
||||
client := http_client.GetHttpClient()
|
||||
startTime := carbon.Now().AddHours(-24).TimestampWithMillisecond()
|
||||
endTime := carbon.Now().TimestampWithMillisecond()
|
||||
startTime := carbon.Now().AddHours(-24).TimestampMilli()
|
||||
endTime := carbon.Now().TimestampMilli()
|
||||
resp, err := client.R().SetQueryParams(map[string]string{
|
||||
"sort": "-timestamp",
|
||||
"limit": "50",
|
||||
@@ -121,7 +121,7 @@ func Trc20CallBack(token string, wg *sync.WaitGroup) {
|
||||
panic(err)
|
||||
}
|
||||
// 区块的确认时间必须在订单创建时间之后
|
||||
createTime := order.CreatedAt.TimestampWithMillisecond()
|
||||
createTime := order.CreatedAt.TimestampMilli()
|
||||
if transfer.BlockTimestamp < createTime {
|
||||
panic("Orders cannot actually be matched")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user