diff --git a/app/store/controller/user/Identity.php b/app/store/controller/user/Identity.php index 14b564d1..6b2c3791 100644 --- a/app/store/controller/user/Identity.php +++ b/app/store/controller/user/Identity.php @@ -1,9 +1,10 @@ request->post('type', 0)); + if ($type) { + $where['type'] = $type; + } + $source = intval($this->request->post('source', 0)); + if ($source) { + $where['source'] = $source; + } + $list = (new UserInvoice)->getList($where); + $data['list'] = $list->items(); + $data['total'] = $list->total(); + return $this->renderSuccess($data); + } +} \ No newline at end of file diff --git a/app/store/model/user/UserInvoice.php b/app/store/model/user/UserInvoice.php new file mode 100644 index 00000000..c406053c --- /dev/null +++ b/app/store/model/user/UserInvoice.php @@ -0,0 +1,27 @@ +with(['user.avatar']) + ->where($where) + ->order($this->getPk(), 'desc') + ->paginate($listRows); + } +} \ No newline at end of file