package jobs

import (
	"go-admin/common/global"
	"go-admin/services/binanceservice"

	"github.com/go-admin-team/go-admin-core/logger"
	"github.com/go-admin-team/go-admin-core/sdk"
)

type StrategyJob struct {
}

// 策略下单任务
func (j StrategyJob) Exec(arg interface{}) error {
	strategyService := binanceservice.BinanceStrategyOrderService{}
	db := getDefaultDb()
	strategyService.Orm = db
	strategyService.Log = logger.NewHelper(sdk.Runtime.GetLogger()).WithFields(map[string]interface{}{})

	//触发币安策略下单
	strategyService.TriggerStrategyOrder(global.EXCHANGE_BINANCE)

	return nil
}
