|
@@ -64,21 +64,18 @@ class Withdraw extends BaseModel
|
|
|
|
|
|
$member_id = $data["member_id"];
|
|
|
$member_model = new Member();
|
|
|
- $member_info_result = $member_model->getMemberInfo([ [ "member_id", "=", $member_id ] ], "balance_money,headimg,wx_openid,username,weapp_openid,balance");
|
|
|
- //echo "<pre>";print_r($member_info_result);exit;
|
|
|
+ $member_info_result = $member_model->getMemberInfo([ [ "member_id", "=", $member_id ] ], "balance_money,headimg,wx_openid,username,weapp_openid");
|
|
|
$member_info = $member_info_result["data"];
|
|
|
if (empty($member_info))
|
|
|
return $this->error([], "MEMBER_NOT_EXIST");
|
|
|
|
|
|
- $balance_money = $member_info["balance"];
|
|
|
- //echo "<pre>";print_r($balance_money);exit;
|
|
|
+ $balance_money = $member_info["balance_money"];
|
|
|
if ($apply_money > $balance_money)
|
|
|
return $this->error([], "申请提现金额不能大于会员可提现金额");
|
|
|
|
|
|
$transfer_type = $data["transfer_type"];
|
|
|
$transfer_type_list = $this->getTransferType();
|
|
|
$transfer_type_name = $transfer_type_list[ $transfer_type ];
|
|
|
- //echo "<pre>";print_r($transfer_type_name);exit;
|
|
|
if (empty($transfer_type_name))
|
|
|
return $this->error([], "不支持的提现方式");
|
|
|
|
|
@@ -135,7 +132,7 @@ class Withdraw extends BaseModel
|
|
|
$result = model("member_withdraw")->add($data);
|
|
|
|
|
|
//减少可提现余额
|
|
|
- model("member")->setDec([ [ "member_id", "=", $member_id ] ], "balance", $apply_money);
|
|
|
+ model("member")->setDec([ [ "member_id", "=", $member_id ] ], "balance_money", $apply_money);
|
|
|
//增加提现中余额
|
|
|
model("member")->setInc([ [ "member_id", "=", $member_id ] ], "balance_withdraw_apply", $apply_money);
|
|
|
|