mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-12 23:00:25 +08:00
修复AscPk()写成Asc()的问题
This commit is contained in:
@@ -297,8 +297,8 @@ func (this *NodeTaskDAO) FindAllDoingNodeTasksWithClusterId(tx *dbs.Tx, role str
|
|||||||
Gt("nodeId", 0).
|
Gt("nodeId", 0).
|
||||||
Where("(isDone=0 OR (isDone=1 AND isOk=0))").
|
Where("(isDone=0 OR (isDone=1 AND isOk=0))").
|
||||||
Desc("isDone").
|
Desc("isDone").
|
||||||
Asc().
|
|
||||||
Asc("nodeId").
|
Asc("nodeId").
|
||||||
|
AscPk().
|
||||||
Slice(&result).
|
Slice(&result).
|
||||||
FindAll()
|
FindAll()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ func (this *RegionProvinceDAO) FindAllEnabledProvincesWithCountryId(tx *dbs.Tx,
|
|||||||
_, err = this.Query(tx).
|
_, err = this.Query(tx).
|
||||||
State(RegionProvinceStateEnabled).
|
State(RegionProvinceStateEnabled).
|
||||||
Attr("countryId", countryId).
|
Attr("countryId", countryId).
|
||||||
Asc().
|
AscPk().
|
||||||
Slice(&result).
|
Slice(&result).
|
||||||
FindAll()
|
FindAll()
|
||||||
return
|
return
|
||||||
@@ -132,7 +132,7 @@ func (this *RegionProvinceDAO) FindAllEnabledProvincesWithCountryId(tx *dbs.Tx,
|
|||||||
func (this *RegionProvinceDAO) FindAllEnabledProvinces(tx *dbs.Tx) (result []*RegionProvince, err error) {
|
func (this *RegionProvinceDAO) FindAllEnabledProvinces(tx *dbs.Tx) (result []*RegionProvince, err error) {
|
||||||
_, err = this.Query(tx).
|
_, err = this.Query(tx).
|
||||||
State(RegionProvinceStateEnabled).
|
State(RegionProvinceStateEnabled).
|
||||||
Asc().
|
AscPk().
|
||||||
Slice(&result).
|
Slice(&result).
|
||||||
FindAll()
|
FindAll()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ func (this *SysEventDAO) CreateEvent(tx *dbs.Tx, event EventInterface) error {
|
|||||||
// 查找事件
|
// 查找事件
|
||||||
func (this *SysEventDAO) FindEvents(tx *dbs.Tx, size int64) (result []*SysEvent, err error) {
|
func (this *SysEventDAO) FindEvents(tx *dbs.Tx, size int64) (result []*SysEvent, err error) {
|
||||||
_, err = this.Query(tx).
|
_, err = this.Query(tx).
|
||||||
Asc().
|
AscPk().
|
||||||
Limit(size).
|
Limit(size).
|
||||||
Slice(&result).
|
Slice(&result).
|
||||||
FindAll()
|
FindAll()
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ func (this *UpdatingServerListDAO) FindLists(tx *dbs.Tx, clusterIds []int64, las
|
|||||||
_, err = this.Query(tx).
|
_, err = this.Query(tx).
|
||||||
Attr("clusterId", clusterIds). // 即使clusterIds数量是变化的,这里也不需要使用Reuse(false),因为clusterIds通常数量有限
|
Attr("clusterId", clusterIds). // 即使clusterIds数量是变化的,这里也不需要使用Reuse(false),因为clusterIds通常数量有限
|
||||||
Gt("id", lastId).
|
Gt("id", lastId).
|
||||||
Asc(). // 非常重要
|
AscPk(). // 非常重要
|
||||||
Slice(&result).
|
Slice(&result).
|
||||||
FindAll()
|
FindAll()
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user