|
@@ -1478,6 +1478,7 @@ class StoreOrderRepository extends BaseRepository
|
|
|
$ratio = $v['award_ratio']; //奖励比例
|
|
$ratio = $v['award_ratio']; //奖励比例
|
|
|
$level_price = bcmul($price, $ratio, 2); //等级奖励金额
|
|
$level_price = bcmul($price, $ratio, 2); //等级奖励金额
|
|
|
@file_put_contents('quanju.txt', "------------------------------------------\r\n", 8);
|
|
@file_put_contents('quanju.txt', "------------------------------------------\r\n", 8);
|
|
|
|
|
+ @file_put_contents('quanju.txt', json_encode($v) . "-团队奖励等级信息\r\n", 8);
|
|
|
@file_put_contents('quanju.txt', $level_price . "-团队奖励等级奖励金额\r\n", 8);
|
|
@file_put_contents('quanju.txt', $level_price . "-团队奖励等级奖励金额\r\n", 8);
|
|
|
foreach ($group_info as &$value) { //遍历上级统计总业绩
|
|
foreach ($group_info as &$value) { //遍历上级统计总业绩
|
|
|
if ($value[$field] >= $v['level']) { //判断是否达到该等级
|
|
if ($value[$field] >= $v['level']) { //判断是否达到该等级
|
|
@@ -1496,7 +1497,7 @@ class StoreOrderRepository extends BaseRepository
|
|
|
$user_retio = bcdiv($value['performance'], $all_performance, 2); //用户奖励比例
|
|
$user_retio = bcdiv($value['performance'], $all_performance, 2); //用户奖励比例
|
|
|
@file_put_contents('quanju.txt', $value['uid'] . "-团队奖励分红uid\r\n", 8);
|
|
@file_put_contents('quanju.txt', $value['uid'] . "-团队奖励分红uid\r\n", 8);
|
|
|
@file_put_contents('quanju.txt', $user_retio . "-团队奖励业绩分红比例\r\n", 8);
|
|
@file_put_contents('quanju.txt', $user_retio . "-团队奖励业绩分红比例\r\n", 8);
|
|
|
- @file_put_contents('quanju.txt', $value['performance'] . "-团队奖励个人\r\n", 8);
|
|
|
|
|
|
|
+ @file_put_contents('quanju.txt', $value['performance'] . "-团队奖励个人业绩\r\n", 8);
|
|
|
$user_reward = bcmul($level_price, $user_retio, 2); //用户奖励金额
|
|
$user_reward = bcmul($level_price, $user_retio, 2); //用户奖励金额
|
|
|
$user_integral = bcdiv($user_reward, $integral_price['price'], 2); //用户奖励积分
|
|
$user_integral = bcdiv($user_reward, $integral_price['price'], 2); //用户奖励积分
|
|
|
$after = bcadd($value['award_integral'], $user_integral, 2); //更新用户奖励积分
|
|
$after = bcadd($value['award_integral'], $user_integral, 2); //更新用户奖励积分
|