diff --git a/g_appcode.go b/g_appcode.go index 7860912..47b518d 100644 --- a/g_appcode.go +++ b/g_appcode.go @@ -1099,7 +1099,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri var l []{{modelName}} 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 { for _, v := range l { ml = append(ml, v) diff --git a/g_hproseappcode.go b/g_hproseappcode.go index 86e3d02..b2a5a8f 100644 --- a/g_hproseappcode.go +++ b/g_hproseappcode.go @@ -260,7 +260,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri var l []{{modelName}} 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 { for _, v := range l { ml = append(ml, v) diff --git a/g_model.go b/g_model.go index 859164f..6b0979e 100644 --- a/g_model.go +++ b/g_model.go @@ -202,7 +202,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri var l []{{modelName}} 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 { for _, v := range l { ml = append(ml, v)