mode = new MerchantMemberRecharge(); return $this->searchVal($param,$this->searchFilter($param))->append(['tel'])->withAttr(['tel' => function($data,$resp){ return hide_mobile($resp['mobile']); }])->hidden(['mobile'])->paginate([ "list_rows" => $param['pageSize'], "page" => $param['page'] ]); } /** * 充值记录 * @param array $param */ public function getLogList(array $param = []) { $this->mode = new MerchantMemberLog(); return $this->searchVal($param,$this->searchFilter($param))->append(['tel'])->withAttr(['tel' => function($data,$resp){ return hide_mobile($resp['mobile']); }])->hidden(['mobile'])->paginate([ "list_rows" => $param['pageSize'], "page" => $param['page'] ]); } protected function searchFilter(array $param = []): array { $filter = []; !empty($param['agent']) && $filter[] = ["agent_id", '=', $param['agent']]; !empty($param['store']) && $filter[] = ["store_id", '=', $param['store']]; !empty($param['status']) && $filter[] = ["status", '=', $param['status']]; !empty($param['type']) && $filter[] = ["type", '=', $param['type']]; return $filter; } }