repository = $repository; $this->areaCode = $this->request->param('areaCode', ''); $this->streetCode = $this->request->param('streetCode', ''); if ($this->areaCode == '' && $this->streetCode == '') { throw new ValidateException('请选择地区'); } } // 提现记录 public function withdrawList(UserExtractRepository $repository) { [$page,$limit] = $this->getPage(); $where = $this->request->params(['status','keyword','date','extract_type']); return app('json')->success($repository->getList($where,$page,$limit)); } // 资金记录 public function billList(UserBillRepository $repository) { [$page, $limit] = $this->getPage(); $where = $this->request->params(['keyword', 'date', 'type']); return app('json')->success($repository->getList($where, $page, $limit)); } // 账单管理统计标题 public function financialRecordTitle(FinancialRecordRepository $repository) { $where = $this->request->params(['date']); $where['is_mer'] = $this->request->merId() ?? 0 ; if($where['is_mer'] == 0){ $data = $repository->getAdminTitle($where); }else{ $data = $repository->getMerchantTitle($where); } return app('json')->success($data); } public function financialRecord(FinancialRecordRepository $repository) { [$page, $limit] = $this->getPage(); $where = $this->request->params(['keyword', 'date', 'mer_id']); $merId = $this->request->merId(); if ($merId) { $where['mer_id'] = $merId; $where['financial_type'] = ['order', 'mer_accoubts', 'brokerage_one', 'brokerage_two', 'refund_brokerage_one', 'refund_brokerage_two', 'refund_order','order_platform_coupon', 'order_svip_coupon','commission_to_service_team','commission_to_service_team_refund','commission_to_platform','commission_to_platform_refund','commission_to_village','commission_to_village_refund','commission_to_town','commission_to_town_refund','commission_to_entry_merchant','commission_to_entry_merchant_refund' ,'commission_to_cloud_warehouse','commission_to_cloud_warehouse_refund']; } else { $where['financial_type'] = ['order', 'sys_accoubts', 'brokerage_one', 'brokerage_two', 'refund_brokerage_one', 'refund_brokerage_two', 'refund_order','order_platform_coupon', 'order_svip_coupon','commission_to_service_team','commission_to_service_team_refund','commission_to_platform','commission_to_platform_refund','commission_to_village','commission_to_village_refund','commission_to_town','commission_to_town_refund' ,'commission_to_entry_merchant','commission_to_entry_merchant_refund' ,'commission_to_cloud_warehouse','commission_to_cloud_warehouse_refund']; } return app('json')->success($repository->getList($where, $page, $limit)); } }