params['type'] ?? 1]; $where[] = ['relation_id','=',$this->shopId]; $status = $this->params['status'] ?? ''; switch ($status){ case 1: $where[] = ['status','=',1]; break; case 2: $where[] = ['status','=',4]; break; case 3: $where[] = ['status','in',[2,5]]; break; case 4: $where[] = ['status','in',[2,3,6]]; break; } return $where; } public function lists(): array { $lists = WithdrawApply::where($this->setWhere()) ->field('id,status,money,create_time') ->append(['status_desc']) ->limit($this->limitOffset, $this->limitLength) ->order('id desc') ->select() ->toArray(); foreach ($lists as $key => $log){ $lists[$key]['desc'] = '提现'; } return $lists; } public function count(): int { return WithdrawApply::where($this->setWhere())->count(); } }