|
@@ -120,7 +120,8 @@ func (s *List) ResultOut(pg *gorm.DB, model any, req rest.IRequestIn) rest.IRequ
|
|
if err != nil {
|
|
if err != nil {
|
|
return req.OutError(rest.ErrorMessage("ErrFileds", err.Error()))
|
|
return req.OutError(rest.ErrorMessage("ErrFileds", err.Error()))
|
|
}
|
|
}
|
|
- sl := reflect.MakeSlice(reflect.ValueOf(model).Type(), 0, 0).Interface()
|
|
|
|
|
|
+ elemType := reflect.TypeOf(reflect.ValueOf(model).Elem())
|
|
|
|
+ sl := reflect.MakeSlice(reflect.SliceOf(elemType), 0, 0).Interface()
|
|
return s.ResultOutNames(pg, fieldNames, sl, req)
|
|
return s.ResultOutNames(pg, fieldNames, sl, req)
|
|
}
|
|
}
|
|
|
|
|