From 1bf17d0ebad99dbd4c9f3839cf9bb373f5fe70d0 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Fri, 13 Oct 2023 11:51:44 +0800 Subject: [PATCH] =?UTF-8?q?fixed:App=E7=AB=AF=E4=BB=BB=E5=8A=A1=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=8E=A5=E5=8F=A3=E5=92=8C=E5=85=85=E5=80=BC=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/RechargeController.php | 2 +- app/api/controller/TaskController.php | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/app/api/controller/RechargeController.php b/app/api/controller/RechargeController.php index a80090373..3fd840c13 100755 --- a/app/api/controller/RechargeController.php +++ b/app/api/controller/RechargeController.php @@ -39,7 +39,7 @@ class RechargeController extends BaseApiController public function deposit_lists() { $params=$this->request->param(); - $list=CompanyAccountLog::where('company_id',$this->userId)->page($params['page_no'],15)->select(); + $list=CompanyAccountLog::where('company_id',$this->userInfo['company_id'])->page($params['page_no'],15)->select(); $datas=[]; foreach($list as $k=>$v){ $datas[$k]['create_time']=$v['create_time']; diff --git a/app/api/controller/TaskController.php b/app/api/controller/TaskController.php index 11793cad6..d11aca276 100644 --- a/app/api/controller/TaskController.php +++ b/app/api/controller/TaskController.php @@ -26,25 +26,24 @@ class TaskController extends BaseApiController [$page, $limit] = $this->getPage(); $time = strtotime(date('Y-m-d')); $userCompanyInfo = Company::where('id', $this->userInfo['company_id'])->find(); + $where = []; + if ($this->userInfo['admin_id'] != 0) { + $where[] = ['company_id', '=', $this->userInfo['company_id']]; + } if ($userCompanyInfo['company_type'] == 18) { - if ($this->userInfo['admin_id'] != 0) { - $where[] = ['company_id', '=', $this->userInfo['company_id']]; + $is_captain = User::where('id', $this->userId)->value('is_captain'); + if ($is_captain == 1) { + $where[] = ['type', 'in', [31,33]]; } else { - - $is_captain = User::where('id', $this->userId)->value('is_captain'); - if ($is_captain == 1) { - $where[] = ['type', 'in', [31,33]]; - } else { - $where[] = ['type', '=', 33]; - $where[] = ['director_uid', '=', $this->userId]; - } - $where[] = ['company_id', '=', $this->userInfo['company_id']]; + $where[] = ['type', '=', 33]; + $where[] = ['director_uid', '=', $this->userId]; } +// $where[] = ['company_id', '=', $this->userInfo['company_id']]; } if ($userCompanyInfo['company_type'] == 41) { $where[] = ['director_uid', '=', $this->userId]; - $where[] = ['company_id', '=', $this->userInfo['company_id']]; +// $where[] = ['company_id', '=', $this->userInfo['company_id']]; } if (isset($param['date_time']) && $param['date_time'] != '') { $time = strtotime($param['date_time']);