where('pay_fund_order_id', 'like', "%$where[pay_fund_order_id]%"); } return $model; } public static function get_user_extract_list($where) { $data = self::setWhere($where)->order('id DESC')->page((int)$where['page'], (int)$where['limit'])->select(); $data = count((array)$data) ? $data->toArray() : []; foreach($data as &$item){ $Extract = UserExtract::where('id',$item['e_id'])->find()->toArray(); $item['extract_price'] = $Extract['extract_price']; if($Extract['mer_id'] == 0){ $item['type'] = "用户提现"; }else if($Extract['mer_id'] == 0 && $Extract['agent_id']){ $item['type'] = "代理提现"; }else{ $item['type'] = "讲师/代理提现"; } } $count = self::setWhere($where)->count(); return compact('data', 'count'); } }