|
@@ -194,15 +194,6 @@ class Notify extends Api
|
|
|
|
|
|
//上级是二级邀请B1,本人C1,贡献给B和A(表面上说B的钱在A那里,但是有记录,有总额,不能提现即可)
|
|
|
if($intro_userinfo['group_id'] == 2 && $intro_userinfo['group_id'] > $userinfo['group_id']){
|
|
|
- $shouyi_c2b_rate = config('site.shouyi_c2b_rate');
|
|
|
- $jewelB = bcdiv(bcmul($gold,$shouyi_c2b_rate),100);
|
|
|
-
|
|
|
- $result = model('Wallet')->lockChangeAccountRemain($intro_userinfo['id'],'agentjewel',$jewelB,52, $userinfo['username'].$remark,$table,$table_id);
|
|
|
- if($result['status']===false)
|
|
|
- {
|
|
|
- Db::rollback();
|
|
|
- return false;
|
|
|
- }
|
|
|
|
|
|
//充值者上上级,也就是A
|
|
|
$intro_intro_userinfo = Db::name('user')->field('id,username,group_id,intro_uid,gender')->where('id',$intro_userinfo['intro_uid'])->find();
|
|
@@ -210,9 +201,8 @@ class Notify extends Api
|
|
|
|
|
|
if($intro_intro_userinfo['group_id'] == 3){
|
|
|
|
|
|
- $shouyi_b2a_rate = config('site.shouyi_b2a_rate');
|
|
|
- $jewelA = bcdiv(bcmul($jewelB,$shouyi_b2a_rate),100);
|
|
|
- $jewelA = bcadd($jewelA,$jewelB);
|
|
|
+ $shouyi_c2a_rate = config('site.shouyi_c2a_rate');
|
|
|
+ $jewelA = bcdiv(bcmul($gold,$shouyi_c2a_rate),100);
|
|
|
|
|
|
$result = model('Wallet')->lockChangeAccountRemain($intro_intro_userinfo['id'],'agentjewel',$jewelA,52, $userinfo['username'].$remark,$table,$table_id);
|
|
|
if($result['status']===false)
|
|
@@ -277,15 +267,7 @@ class Notify extends Api
|
|
|
|
|
|
//上级是二级邀请B1,本人C1,贡献给B和A(表面上说B的钱在A那里,但是有记录,有总额,不能提现即可)
|
|
|
if($intro_userinfo['group_id'] == 2 && $intro_userinfo['group_id'] > $userinfo['group_id']){
|
|
|
- $recharge_c2b_rate = config('site.recharge_c2b_rate');
|
|
|
- $jewelB = bcdiv(bcmul($gold,$recharge_c2b_rate),100);
|
|
|
|
|
|
- $result = model('Wallet')->lockChangeAccountRemain($intro_userinfo['id'],'agentjewel',$jewelB,51, $userinfo['username'].'充值','pay_order',$payorder_id);
|
|
|
- if($result['status']===false)
|
|
|
- {
|
|
|
- Db::rollback();
|
|
|
- return false;
|
|
|
- }
|
|
|
|
|
|
//充值者上上级,也就是A
|
|
|
$intro_intro_userinfo = Db::name('user')->field('id,username,group_id,intro_uid,gender')->where('id',$intro_userinfo['intro_uid'])->find();
|
|
@@ -293,9 +275,8 @@ class Notify extends Api
|
|
|
|
|
|
if($intro_intro_userinfo['group_id'] == 3){
|
|
|
|
|
|
- $recharge_b2a_rate = config('site.recharge_b2a_rate');
|
|
|
- $jewelA = bcdiv(bcmul($jewelB,$recharge_b2a_rate),100);
|
|
|
- $jewelA = bcadd($jewelA,$jewelB);
|
|
|
+ $recharge_c2a_rate = config('site.recharge_c2a_rate');
|
|
|
+ $jewelA = bcdiv(bcmul($gold,$recharge_c2a_rate),100);
|
|
|
|
|
|
$result = model('Wallet')->lockChangeAccountRemain($intro_intro_userinfo['id'],'agentjewel',$jewelA,51, $userinfo['username'].'充值','pay_order',$payorder_id);
|
|
|
if($result['status']===false)
|
|
@@ -334,16 +315,6 @@ class Notify extends Api
|
|
|
//上上级是B1,上级是C1,自己是D1,
|
|
|
if($intro_intro_userinfo['group_id'] == 2){
|
|
|
|
|
|
- //先给B1
|
|
|
- $recharge_c2b_rate = config('site.recharge_c2b_rate');
|
|
|
- $jewelB = bcdiv(bcmul($jewelC,$recharge_c2b_rate),100);
|
|
|
-
|
|
|
- $result = model('Wallet')->lockChangeAccountRemain($intro_intro_userinfo['id'],'agentjewel',$jewelB,51, $userinfo['username'].'充值','pay_order',$payorder_id);
|
|
|
- if($result['status']===false)
|
|
|
- {
|
|
|
- Db::rollback();
|
|
|
- return false;
|
|
|
- }
|
|
|
|
|
|
//充值者上上级,也就是A
|
|
|
$intro_intro_intro_userinfo = Db::name('user')->field('id,username,group_id,intro_uid,gender')->where('id',$intro_intro_userinfo['intro_uid'])->find();
|
|
@@ -351,9 +322,8 @@ class Notify extends Api
|
|
|
|
|
|
if($intro_intro_intro_userinfo['group_id'] == 3){
|
|
|
|
|
|
- $recharge_b2a_rate = config('site.recharge_b2a_rate');
|
|
|
- $jewelA = bcdiv(bcmul($jewelB,$recharge_b2a_rate),100);
|
|
|
- $jewelA = bcadd($jewelA,$jewelB);
|
|
|
+ $recharge_c2a_rate = config('site.recharge_c2a_rate');
|
|
|
+ $jewelA = bcdiv(bcmul($jewelC,$recharge_c2a_rate),100);
|
|
|
|
|
|
$result = model('Wallet')->lockChangeAccountRemain($intro_intro_intro_userinfo['id'],'agentjewel',$jewelA,51, $userinfo['username'].'充值','pay_order',$payorder_id);
|
|
|
if($result['status']===false)
|