Merge branch '单边仓位_master' of http://120.25.162.35:82/hucan/exchange_go into 单边仓位_master

This commit is contained in:
daichao
2025-02-19 11:57:59 +08:00
5 changed files with 113 additions and 39 deletions

View File

@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
"github.com/bytedance/sonic"
"go-admin/app/admin/models"
"go-admin/app/admin/service"
"go-admin/app/admin/service/dto"
@ -16,17 +15,18 @@ import (
"go-admin/pkg/utility/snowflakehelper"
"go-admin/services/binanceservice"
"go-admin/services/fileservice"
"gorm.io/driver/mysql"
"io"
"net/http"
"os"
"os/exec"
"path/filepath"
"slices"
"strconv"
"strings"
"time"
"github.com/bytedance/sonic"
"gorm.io/driver/mysql"
"github.com/shopspring/decimal"
"github.com/go-admin-team/go-admin-core/sdk"
@ -385,9 +385,6 @@ func (l ListenSymbol) Exec(arg interface{}) error {
continue
}
for _, symbol := range symbols.Data.Data {
if chain == "bsc" {
fmt.Println(symbol.Token0Symbol + symbol.Token1Symbol)
}
if slices.Contains(set, symbol.Token0Symbol+symbol.Token1Symbol) || slices.Contains(set, symbol.Token1Symbol+symbol.Token0Symbol) {
//发送邮箱
emails := strings.Split(configResp.ConfigValue, ",")
@ -412,7 +409,7 @@ func (l ListenSymbol) Exec(arg interface{}) error {
func (l ListenSymbol) GetAveRequestId() (aveToken string, err error) {
execPath, err := os.Getwd()
// 获取可执行文件所在的目录
execDir := fmt.Sprintf("%s/config/ave.js", filepath.Dir(filepath.Dir(execPath)))
execDir := fmt.Sprintf("%s/config/ave.js", execPath)
_, err = os.Stat(execDir)
if err != nil {
logger.Error("可执行的js 文件不存在")