Files
2020-08-06 15:26:41 +08:00

56 lines
1.6 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +------------------------------------------------+
// |http://www.cjango.com |
// +------------------------------------------------+
// | 修复BUG不是一朝一夕的事情等我喝醉了再说吧 |
// +------------------------------------------------+
// | Author: 小陈叔叔 <Jason.Chen> |
// +------------------------------------------------+
namespace app\system\controller;
use app\common\model\Withdrawal as WithdrawalModel;
use app\common\service\Excel;
use app\common\service\Withdrawal as WithdrawalService;
class Withdrawal extends _Init
{
public function index($nickname = '')
{
$model = new WithdrawalModel();
$model = $model->hasWhere('userinfo');
$map = [];
if ($nickname) {
$map["MemberInfo.nickname"] = ['like', "%$nickname%"];
}
$this->list = $model->where($map)->order('create_time desc')->paginate();
return $this->fetch('');
}
/**
* 修改提现状态
* @param [type] $id 提现id
* @param [type] $status 状态
* @return [type]
*/
public function status($status, $id)
{
$result = WithdrawalService::status($id, $status);
return $this->back($result);
}
public function toexcel($nickname = '')
{
$model = new WithdrawalModel();
$model = $model->hasWhere('userinfo');
$map = [];
if ($nickname) {
$map["MemberInfo.nickname"] = ['like', "%$nickname%"];
}
$list = $model->where($map)->order('create_time desc')->select();
Excel::withdrawal_excel($list);
}
}