1、暂存

This commit is contained in:
2025-10-14 19:58:59 +08:00
parent 556a32cb7c
commit 643eab3496
60 changed files with 5244 additions and 657 deletions

View File

@ -9,8 +9,8 @@ import (
"go-admin/common/const/rediskey"
"go-admin/common/global"
"go-admin/common/helper"
"go-admin/models/positiondto"
"go-admin/pkg/utility"
"go-admin/services/binanceservice"
"time"
"github.com/bytedance/sonic"
@ -128,10 +128,10 @@ func removeExpirateChildOrder(childOrders []models.LinePreOrder, db *gorm.DB) {
spotAdPositionStr, _ := helper.DefaultRedis.GetAllList(spotAddKey)
futReduceStr, _ := helper.DefaultRedis.GetAllList(futReduceKey)
spotReduceStr, _ := helper.DefaultRedis.GetAllList(spotReduceKey)
futAddPositionCache := binanceservice.AddPositionList{}
spotAddPositionCache := binanceservice.AddPositionList{}
futReduceCache := binanceservice.ReduceListItem{}
spotReduceCache := binanceservice.ReduceListItem{}
futAddPositionCache := positiondto.AddPositionList{}
spotAddPositionCache := positiondto.AddPositionList{}
futReduceCache := positiondto.ReduceListItem{}
spotReduceCache := positiondto.ReduceListItem{}
futAddPositionMap := map[int]string{}
spotAddPositionMap := map[int]string{}
futReduceMap := map[int]string{}

View File

@ -242,7 +242,7 @@ func (t LimitOrderTimeoutDuration) ReSpotOrderPlace(db *gorm.DB, order models.Li
} else {
var remainingQuantity decimal.Decimal
spotOrder, err := spotApi.GetOrderByOrderSnLoop(order.Symbol, order.OrderSn, apiUserinfo, 4)
tradeSet, _ := cacheservice.GetTradeSet(global.EXCHANGE_BINANCE, order.Symbol, 0)
tradeSet, _ := cacheservice.GetTradeSet(global.EXCHANGE_BINANCE, order.Symbol, 1)
if err == nil {
origQty := utility.StrToDecimal(spotOrder.OrigQty)
@ -360,7 +360,7 @@ func (t LimitOrderTimeoutDuration) ReFutOrderPlace(db *gorm.DB, order models.Lin
} else {
var remainingQuantity decimal.Decimal
spotOrder, err := futApi.GetOrderByOrderSnLoop(order.Symbol, order.OrderSn, apiUserinfo, 4)
tradeSet, _ := cacheservice.GetTradeSet(global.EXCHANGE_BINANCE, order.Symbol, 1)
tradeSet, _ := cacheservice.GetTradeSet(global.EXCHANGE_BINANCE, order.Symbol, 2)
if err == nil {
origQty := utility.StrToDecimal(spotOrder.OrigQty)