|
|
@ -180,8 +180,8 @@ class OrderPartnerJob implements JobInterface |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
//直推贡献10% |
|
|
|
//直推贡献10% |
|
|
|
if(!empty($data['spread_uid'])){ |
|
|
|
if(!empty($user->spread_uid2)){ |
|
|
|
$user_zt = User::getDB()->where('uid', $data['spread_uid'])->find(); |
|
|
|
$user_zt = User::getDB()->where('uid', $user->spread_uid2)->find(); |
|
|
|
$zt_value = bcmul($total_price, 0.1, 2); |
|
|
|
$zt_value = bcmul($total_price, 0.1, 2); |
|
|
|
$user_zt->all_value = bcadd($user_zt->all_value, $zt_value, 2); |
|
|
|
$user_zt->all_value = bcadd($user_zt->all_value, $zt_value, 2); |
|
|
|
$user_zt->save(); |
|
|
|
$user_zt->save(); |
|
|
@ -191,7 +191,7 @@ class OrderPartnerJob implements JobInterface |
|
|
|
'num' => $user_value, |
|
|
|
'num' => $user_value, |
|
|
|
'ctime' => date('Y-m-d H:i:s'), |
|
|
|
'ctime' => date('Y-m-d H:i:s'), |
|
|
|
'memo' => '订单直推消费贡献值', |
|
|
|
'memo' => '订单直推消费贡献值', |
|
|
|
'user_id' => $data['spread_uid'], |
|
|
|
'user_id' => $user->spread_uid2, |
|
|
|
]; |
|
|
|
]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|