'处理中', self::STATUS_ONE => '已审核', self::STATUS_TWO => '已拒绝', self::STATUS_THREE => '支付中', self::STATUS_FOUR => '支付成功', self::STATUS_FIVE => '用户取消', ]; public static function getUserDrawalList(array $data) { $where['user_id'] = $data['user_id']; if ($data['account_type'] > 0) { $where['account_type'] = $data['account_type']; } if ($data['page'] < 1) { $data['page'] = 1; } if ($data['page_size'] < 1) { $data['page_size'] = 10; } $count = self::where($where)->count(); $list = self::where($where)->field('account_type,order_no,service_fee,total_amount as apply_num,apply_type,pay_info,status,beizhu,create_time') ->page($data['page'], $data['page_size'])->order('id', 'desc')->select(); if (empty($list)) { return []; } else { return [ 'total' => $count, 'list' => $list->toArray() ]; } } public static function InsertUserDrawalLog(array $data) { $self = new self; $self->user_id = $data['user_id']; $self->order_no = $data['order_no']; $self->account_type = $data['account_type']; $self->service_fee = $data['service_fee']; $self->apply_num = $data['apply_num']; $self->apply_type = $data['apply_type']; $self->pay_info = $data['pay_info']; $self->status = 0; $self->drawal_type = $data['drawal_type']; $self->country = $data['country']; $self->currency_rate = $data['currency_rate']; $self->total_amount = $data['total_amount']; $self->market_amount = $data['market_amount']; $self->deal_admin_id = 0; $self->create_time = date('Y-m-d H:i:s'); $self->update_time = date('Y-m-d H:i:s'); return $self->save(); } public static function getUserDrawalInfo(array $where) { $info = self::where($where)->find(); if ($info) { return $info->toArray(); } else { return []; } } }