feat: 新增
This commit is contained in:
parent
a6282340b3
commit
758460e3ab
|
@ -74,7 +74,7 @@ class Task3
|
|||
ActiveUsers::create([
|
||||
'user_id' => $parent->id,
|
||||
'phone' => $value->phone,
|
||||
'income' => $value->day_score,
|
||||
'income' => $value->day_score*0.2,
|
||||
]);
|
||||
|
||||
//判定有没有父级的父级 这里父级没有默认是0
|
||||
|
@ -83,11 +83,11 @@ class Task3
|
|||
}
|
||||
//获取父级的父级
|
||||
$ancestor = User::find($parent->f_id);
|
||||
// ActiveUsers::create([
|
||||
// 'user_id' => $ancestorW->id,
|
||||
// 'phone' => $value->phone,
|
||||
// 'income' => $value->day_score,
|
||||
// ]);
|
||||
ActiveUsers::create([
|
||||
'user_id' => $ancestor->id,
|
||||
'phone' => $value->phone,
|
||||
'income' => $value->day_score*0.1,
|
||||
]);
|
||||
//今天活跃人数加1
|
||||
$ancestor->active_figures += 1;
|
||||
$ancestor->save();
|
||||
|
|
Loading…
Reference in New Issue