mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-06 10:00:24 +08:00
修改两处SQL语句复用的问题,避免产生复用语句过多
This commit is contained in:
@@ -1033,6 +1033,7 @@ func (this *ServerDAO) CountEnabledServersWithWebIds(tx *dbs.Tx, webIds []int64)
|
|||||||
return this.Query(tx).
|
return this.Query(tx).
|
||||||
State(ServerStateEnabled).
|
State(ServerStateEnabled).
|
||||||
Attr("webId", webIds).
|
Attr("webId", webIds).
|
||||||
|
Reuse(false).
|
||||||
Count()
|
Count()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1044,6 +1045,7 @@ func (this *ServerDAO) FindAllEnabledServersWithWebIds(tx *dbs.Tx, webIds []int6
|
|||||||
_, err = this.Query(tx).
|
_, err = this.Query(tx).
|
||||||
State(ServerStateEnabled).
|
State(ServerStateEnabled).
|
||||||
Attr("webId", webIds).
|
Attr("webId", webIds).
|
||||||
|
Reuse(false).
|
||||||
AscPk().
|
AscPk().
|
||||||
Slice(&result).
|
Slice(&result).
|
||||||
FindAll()
|
FindAll()
|
||||||
|
|||||||
Reference in New Issue
Block a user