|
@@ -49,6 +49,10 @@ class {{ sp.sp_name.camel_upper }} extends LuSpModel {
|
49
|
49
|
$values = DB::select('SELECT (SELECT count(*) FROM {{ spcall }}) as count, (SELECT json_agg(q) FROM (SELECT * FROM {{ spcall }} OFFSET (:page::int * :perPage::int) LIMIT :perPage) q) as data',
|
50
|
50
|
array({{ argsarray }}, ":page" => $page, ":perPage" => $perPage));
|
51
|
51
|
$value = $values[0];
|
|
52
|
+ if (is_null($value->data))
|
|
53
|
+ {
|
|
54
|
+ $value->data = '[]';
|
|
55
|
+ }
|
52
|
56
|
$data = LuStringUtils::convertJsonString($value->data);
|
53
|
57
|
return new LuMultipleDbo($value->count, $data);
|
54
|
58
|
}
|