fixed:App端任务列表接口和充值记录列表接口

This commit is contained in:
chenbo 2023-10-13 11:51:44 +08:00
parent 001f8016ca
commit 1bf17d0eba
2 changed files with 12 additions and 13 deletions

View File

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

View File

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