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']);