- change return type to PagedInfo for GetStoreOpRequests

This commit is contained in:
gazebo
2018-12-21 10:41:28 +08:00
parent bf3463aee8
commit a4b0a95667
2 changed files with 22 additions and 6 deletions

View File

@@ -169,3 +169,11 @@ func ExecuteSQL(db *DaoDB, sql string, params ...interface{}) (num int64, err er
}, sql)
return num, err
}
func GetLastTotalRowCount(db *DaoDB) int {
countInfo := &struct{ Ct int }{}
if err := GetRow(db, countInfo, "SELECT FOUND_ROWS() ct"); err == nil {
return countInfo.Ct
}
return 0
}