修改两处SQL语句复用的问题,避免产生复用语句过多

This commit is contained in:
刘祥超
2021-03-08 19:05:24 +08:00
parent a92062fe97
commit e68f3e22ee

View File

@@ -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()