代码初始化
This commit is contained in:
62
application/api/controller/UserWithdrawal.php
Normal file
62
application/api/controller/UserWithdrawal.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\controller\BaseCom;
|
||||
use Yzh\YunPay;
|
||||
|
||||
|
||||
class UserWithdrawal extends BaseCom
|
||||
{
|
||||
//提现
|
||||
public function withdrawal(){
|
||||
$key_name = "api:user:withdrawal:" . $this->uid;
|
||||
redis_lock_exit($key_name);
|
||||
$number = input('number', 0);//提现金额(钻石)
|
||||
$type = input('type', 1);
|
||||
$sms_code = input('sms_code', '');
|
||||
$reslut = model('UserWithdrawal')->withdrawal($this->uid,$number, $type,$sms_code);
|
||||
redis_unlock($key_name);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//提现记录
|
||||
public function withdrawal_list(){
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 10);
|
||||
$search_stime = input('search_stime', '');
|
||||
$search_etime = input('search_etime', '');
|
||||
$reslut = model('UserWithdrawal')->withdrawal_list($this->uid,$page,$page_limit,$search_stime,$search_etime);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
|
||||
}
|
||||
//获取签约协议链接
|
||||
public function get_sign_url(){
|
||||
$yun_pay = new YunPay();
|
||||
$reslut = $yun_pay->getAgreementPreviewUrl();
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//云账户签约
|
||||
public function sign_yun_account(){
|
||||
$real_name = input('real_name', '');
|
||||
$id_card = input('id_card', '');
|
||||
$yun_pay = new YunPay();
|
||||
$reslut = $yun_pay->apiUserSign($real_name,$id_card);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//获取用户签约状态
|
||||
public function get_yun_account_status(){
|
||||
$real_name = input('real_name', '');
|
||||
$id_card = input('id_card', '');
|
||||
$yun_pay = new YunPay();
|
||||
$reslut = $yun_pay->getApiUserSignStatus($real_name,$id_card);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//用户云账户解约
|
||||
public function cancel_yun_account(){
|
||||
$real_name = input('real_name', '');
|
||||
$id_card = input('id_card', '');
|
||||
$yun_pay = new YunPay();
|
||||
$reslut = $yun_pay->unSignYunAccount($real_name,$id_card);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user