修改一处统计分组中服务数量的错误

This commit is contained in:
GoEdgeLab
2020-10-29 21:45:45 +08:00
parent 884862b2ef
commit b7adb8b293

View File

@@ -5,6 +5,7 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"github.com/TeaOSLab/EdgeAPI/internal/utils/numberutils"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs" "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
_ "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql"
"github.com/iwind/TeaGo/Tea" "github.com/iwind/TeaGo/Tea"
@@ -762,7 +763,7 @@ func (this *ServerDAO) CountAllEnabledServersWithGroupId(groupId int64) (int64,
return this.Query(). return this.Query().
State(ServerStateEnabled). State(ServerStateEnabled).
Where("JSON_CONTAINS(groupIds, :groupId)"). Where("JSON_CONTAINS(groupIds, :groupId)").
Param("groupId", groupId). Param("groupId", numberutils.FormatInt64(groupId)).
Count() Count()
} }