1、反向下单 暂时提交
This commit is contained in:
@ -21,7 +21,6 @@ import (
|
||||
|
||||
"github.com/bytedance/sonic"
|
||||
"github.com/go-admin-team/go-admin-core/logger"
|
||||
log "github.com/go-admin-team/go-admin-core/logger"
|
||||
"github.com/shopspring/decimal"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@ -29,7 +28,7 @@ import (
|
||||
/*
|
||||
订单回调
|
||||
*/
|
||||
func ChangeSpotOrder(mapData map[string]interface{}) {
|
||||
func ChangeSpotOrder(mapData map[string]interface{}, apiKey string) {
|
||||
// 检查订单号是否存在
|
||||
orderSn, ok := mapData["c"]
|
||||
originOrderSn := mapData["C"] //取消操作 代表原始订单号
|
||||
@ -193,7 +192,7 @@ func handleMainReduceFilled(db *gorm.DB, preOrder *DbModels.LinePreOrder) {
|
||||
lock := helper.NewRedisLock(fmt.Sprintf(rediskey.SpotReduceCallback, preOrder.ApiId, preOrder.Symbol), 120, 20, 100*time.Millisecond)
|
||||
|
||||
if ok, err := lock.AcquireWait(context.Background()); err != nil {
|
||||
log.Error("获取锁失败", err)
|
||||
logger.Error("获取锁失败", err)
|
||||
return
|
||||
} else if ok {
|
||||
defer lock.Release()
|
||||
|
||||
Reference in New Issue
Block a user