|
|
|
@ -179,6 +179,22 @@ class OrderPartnerJob implements JobInterface |
|
|
|
|
'user_id' => $data['uid'], |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
//直推贡献10% |
|
|
|
|
if(!empty($data['spread_uid'])){ |
|
|
|
|
$user_zt = User::getDB()->where('uid', $data['spread_uid'])->find(); |
|
|
|
|
$zt_value = bcmul($total_price, 0.1, 2); |
|
|
|
|
$user_zt->all_value = bcadd($user_zt->all_value, $zt_value, 2); |
|
|
|
|
$user_zt->save(); |
|
|
|
|
$user_log_data[] = [ |
|
|
|
|
'type' => 6, |
|
|
|
|
'types_of' => 1, |
|
|
|
|
'num' => $user_value, |
|
|
|
|
'ctime' => date('Y-m-d H:i:s'), |
|
|
|
|
'memo' => '订单直推消费贡献值', |
|
|
|
|
'user_id' => $data['spread_uid'], |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//处理合作人角色是否包含此商品品牌 |
|
|
|
|
if (!empty($brand_ids)) { |
|
|
|
|