feat: 新增

This commit is contained in:
陈狼 2025-02-23 17:50:52 +08:00
parent a6282340b3
commit 758460e3ab
1 changed files with 6 additions and 6 deletions

View File

@ -74,7 +74,7 @@ class Task3
ActiveUsers::create([ ActiveUsers::create([
'user_id' => $parent->id, 'user_id' => $parent->id,
'phone' => $value->phone, 'phone' => $value->phone,
'income' => $value->day_score, 'income' => $value->day_score*0.2,
]); ]);
//判定有没有父级的父级 这里父级没有默认是0 //判定有没有父级的父级 这里父级没有默认是0
@ -83,11 +83,11 @@ class Task3
} }
//获取父级的父级 //获取父级的父级
$ancestor = User::find($parent->f_id); $ancestor = User::find($parent->f_id);
// ActiveUsers::create([ ActiveUsers::create([
// 'user_id' => $ancestorW->id, 'user_id' => $ancestor->id,
// 'phone' => $value->phone, 'phone' => $value->phone,
// 'income' => $value->day_score, 'income' => $value->day_score*0.1,
// ]); ]);
//今天活跃人数加1 //今天活跃人数加1
$ancestor->active_figures += 1; $ancestor->active_figures += 1;
$ancestor->save(); $ancestor->save();