|
|
@@ -61,9 +61,8 @@ class CommonLogic
|
|
|
$config = config('team_level_where');
|
|
|
$team_level_id = $team_level_id - 1;
|
|
|
$paths = UserPathModel::where('user_id', $user_id)->where('distance', '<=', $config[$team_level_id]['level'])->order('distance', 'asc')->column('parent_id');
|
|
|
- if(count($paths) > 0){
|
|
|
- //收益
|
|
|
- $income = bcmul($num, config('team_level_inc'), 2);
|
|
|
+ $income = bcmul($num, config('team_level_inc'), 2); //收益
|
|
|
+ if(count($paths) > 0 && $income > 0){
|
|
|
//余额记录
|
|
|
foreach($paths as $pathId){
|
|
|
if(!empty(Loader::model('UserModel')::getTeamLevelId($pathId))) {
|