mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 23:20:26 +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).
|
||||
State(ServerStateEnabled).
|
||||
Attr("webId", webIds).
|
||||
Reuse(false).
|
||||
Count()
|
||||
}
|
||||
|
||||
@@ -1044,6 +1045,7 @@ func (this *ServerDAO) FindAllEnabledServersWithWebIds(tx *dbs.Tx, webIds []int6
|
||||
_, err = this.Query(tx).
|
||||
State(ServerStateEnabled).
|
||||
Attr("webId", webIds).
|
||||
Reuse(false).
|
||||
AscPk().
|
||||
Slice(&result).
|
||||
FindAll()
|
||||
|
||||
Reference in New Issue
Block a user