From b7adb8b2939a11e208a13189d65104c14a1bdab7 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Thu, 29 Oct 2020 21:45:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E5=A4=84=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=88=86=E7=BB=84=E4=B8=AD=E6=9C=8D=E5=8A=A1=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/db/models/server_dao.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/db/models/server_dao.go b/internal/db/models/server_dao.go index 03780637..101bd9b2 100644 --- a/internal/db/models/server_dao.go +++ b/internal/db/models/server_dao.go @@ -5,6 +5,7 @@ import ( "encoding/json" "errors" "fmt" + "github.com/TeaOSLab/EdgeAPI/internal/utils/numberutils" "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs" _ "github.com/go-sql-driver/mysql" "github.com/iwind/TeaGo/Tea" @@ -762,7 +763,7 @@ func (this *ServerDAO) CountAllEnabledServersWithGroupId(groupId int64) (int64, return this.Query(). State(ServerStateEnabled). Where("JSON_CONTAINS(groupIds, :groupId)"). - Param("groupId", groupId). + Param("groupId", numberutils.FormatInt64(groupId)). Count() }