Commit aed4a2d7 by 冷斌

fix bug

parent 24c9fce0
...@@ -814,14 +814,14 @@ class PayAction extends CommonAction ...@@ -814,14 +814,14 @@ class PayAction extends CommonAction
if ($user['binding_uid'] <= 0) { if ($user['binding_uid'] <= 0) {
return ; return ;
} }
$num = M('el_user')->where(array('binding_uid' => $recharge['binding_uid']))->count(); $num = M('el_user')->where(array('binding_uid' => $user['binding_uid']))->count();
$level = [ $level = [
// 0 => 0.1, // 0 => 0.1,
// 50 => 0.2, // 50 => 0.2,
// 180 => 0.3 // 180 => 0.3
0 => 0.1, 1 => 0.1,
1 => 0.2, 2 => 0.2,
2 => 0.3, 3 => 0.3,
]; ];
$r = 0; $r = 0;
foreach ($level as $time => $rate) { foreach ($level as $time => $rate) {
...@@ -831,11 +831,11 @@ class PayAction extends CommonAction ...@@ -831,11 +831,11 @@ class PayAction extends CommonAction
} }
//$money = $recharge['money'] * $r; //$money = $recharge['money'] * $r;
$money = 100 * $r; $money = 100 * $r;
$zy_split_balance = M('zy_split_balance')->where(array('uid' => $recharge['invite_id']))->find(); $zy_split_balance = M('zy_split_balance')->where(array('uid' => $user['binding_uid']))->find();
$nn = $zy_split_balance['balance'] + $money; $nn = $zy_split_balance['balance'] + $money;
M('zy_split_balance')->where(array('uid' => $recharge['invite_id']))->save(['balance' => $nn]); M('zy_split_balance')->where(array('uid' => $user['binding_uid']))->save(['balance' => $nn]);
M('zy_split_balance_flow')->add([ M('zy_split_balance_flow')->add([
'uid' => $recharge['invite_id'], 'uid' => $user['binding_uid'],
'type' => 5, 'type' => 5,
'num' => $money, 'num' => $money,
'balance' => $money, 'balance' => $money,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment