...
|
...
|
@@ -218,6 +218,10 @@ class PayController extends HomeBaseController |
|
|
Db::name('my_user') -> where('uid',$teacher['uid']) -> setInc('balance',$money);
|
|
|
//计算业务员这条订单的收入
|
|
|
$balance_salesman = $order['money'] - $order['money']*$money_ratio['platform_ratio'] - $money;
|
|
|
//平台抽成收益加入数据库
|
|
|
$as_income_money['money'] = $order['money']*$money_ratio['platform_ratio'];
|
|
|
$as_income_money['time'] = time();
|
|
|
Db::name('income_money') -> insert($as_income_money);
|
|
|
//增加业务员的余额
|
|
|
Db::name('my_user') -> where('uid',$order['salesman_uid']) -> setInc('balance',$balance_salesman);
|
|
|
//添加业务员的收入记录
|
...
|
...
|
@@ -249,6 +253,10 @@ class PayController extends HomeBaseController |
|
|
Db::name('my_user') -> where('uid',$teacher) -> setInc('balance',$money);
|
|
|
//计算业务员这条订单的收入
|
|
|
$balance_salesman = $order['money'] - $order['money']*$money_ratio['platform_ratio'] - $money;
|
|
|
//平台抽成收益加入数据库
|
|
|
$ass_income_money['money'] = $order['money']*$money_ratio['platform_ratio'];
|
|
|
$ass_income_money['time'] = time();
|
|
|
Db::name('income_money') -> insert($ass_income_money);
|
|
|
//增加业务员的余额
|
|
|
Db::name('my_user') -> where('uid',$order['salesman_uid']) -> setInc('balance',$balance_salesman);
|
|
|
cache('aa',$balance_salesman);
|
...
|
...
|
|