From b1934990869494d314521173be1b755cd280311a Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 16 Nov 2023 11:33:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=8A=BC=E9=87=91=E5=87=AD?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CompanyController.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/app/middleapi/controller/CompanyController.php b/app/middleapi/controller/CompanyController.php index 4a62bf9a3..40dc05bfd 100644 --- a/app/middleapi/controller/CompanyController.php +++ b/app/middleapi/controller/CompanyController.php @@ -15,6 +15,7 @@ use app\common\model\dict\DictData; use app\common\model\task_scheduling\TaskScheduling; use app\common\model\user\User; + use app\common\model\CompanyDepositVoucher; use think\facade\Db; use think\facade\Log; use think\response\Json; @@ -327,4 +328,32 @@ } return $this->success('success', array_unique($data)); } + + public function getDepositRechargeTransferVoucherList() + { + if(!$this->request->isPost()){ + return $this->fail('请求方式错误'); + } + $params = $this->request->post(['page_no','page_size', 'account', 'mobile', 'company_id']); + $where = []; + if(isset($params['company_id']) && $params['company_id'] > 0){ + $where[] = ['company_id', '=', $params['company_id']]; + } + $pageNo = !empty($params['page_no']) ? $params['page_no'] : 1; + $pageSize = !empty($params['page_size']) ? $params['page_size'] : 20; + $lists = CompanyDepositVoucher::where($where) + ->page($pageNo, $pageSize) + ->order(['id' => 'desc']) + ->select() + ->toArray(); + $count=CompanyDepositVoucher::where($where)->count(); + + $result = [ + 'lists' => $lists, + 'count' => $count, + 'page_no' => $pageNo, + 'page_size' => $pageSize + ]; + return $this->success('请求成功',$result); + } } \ No newline at end of file