父级分红
This commit is contained in:
parent
1c0b6c5bf6
commit
b236a8b200
|
@ -55,19 +55,21 @@ class UserRewardDao
|
|||
/**
|
||||
* 父级 父父级分红
|
||||
*/
|
||||
public static function f_bounty($userid, $status, $money, $memo){
|
||||
public static function f_bounty($userid, $status, $money, $memo)
|
||||
{
|
||||
//父分红
|
||||
$f_dividend = floor($money * 0.2);
|
||||
//父父分红
|
||||
$ff_dividend = floor($money * 0.1);
|
||||
$user = User::find($userid);
|
||||
if($user->f_id!=0&&$user->f_id!=0){
|
||||
if ($user->f_id != 0) {
|
||||
$f = User::find($user->f_id);
|
||||
self::base($f->id, 5, $f_dividend, '加粉赏金');
|
||||
if ($user->ff_id != 0) {
|
||||
$ff = User::find($user->ff_id);
|
||||
self::base($ff->id, 5, $ff_dividend, '加粉赏金');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 搜索函数
|
||||
|
|
Loading…
Reference in New Issue