mirror of
https://github.com/beego/bee.git
synced 2024-11-22 15:10:54 +00:00
commit
88a60a59ae
@ -1105,7 +1105,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri
|
|||||||
|
|
||||||
var l []{{modelName}}
|
var l []{{modelName}}
|
||||||
qs = qs.OrderBy(sortFields...)
|
qs = qs.OrderBy(sortFields...)
|
||||||
if _, err := qs.Limit(limit, offset).All(&l, fields...); err == nil {
|
if _, err = qs.Limit(limit, offset).All(&l, fields...); err == nil {
|
||||||
if len(fields) == 0 {
|
if len(fields) == 0 {
|
||||||
for _, v := range l {
|
for _, v := range l {
|
||||||
ml = append(ml, v)
|
ml = append(ml, v)
|
||||||
|
@ -263,7 +263,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri
|
|||||||
|
|
||||||
var l []{{modelName}}
|
var l []{{modelName}}
|
||||||
qs = qs.OrderBy(sortFields...)
|
qs = qs.OrderBy(sortFields...)
|
||||||
if _, err := qs.Limit(limit, offset).All(&l, fields...); err == nil {
|
if _, err = qs.Limit(limit, offset).All(&l, fields...); err == nil {
|
||||||
if len(fields) == 0 {
|
if len(fields) == 0 {
|
||||||
for _, v := range l {
|
for _, v := range l {
|
||||||
ml = append(ml, v)
|
ml = append(ml, v)
|
||||||
|
@ -225,7 +225,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri
|
|||||||
|
|
||||||
var l []{{modelName}}
|
var l []{{modelName}}
|
||||||
qs = qs.OrderBy(sortFields...)
|
qs = qs.OrderBy(sortFields...)
|
||||||
if _, err := qs.Limit(limit, offset).All(&l, fields...); err == nil {
|
if _, err = qs.Limit(limit, offset).All(&l, fields...); err == nil {
|
||||||
if len(fields) == 0 {
|
if len(fields) == 0 {
|
||||||
for _, v := range l {
|
for _, v := range l {
|
||||||
ml = append(ml, v)
|
ml = append(ml, v)
|
||||||
|
Loading…
Reference in New Issue
Block a user