直推调整

main
limu 10 months ago
parent 3415d4fe5e
commit 8dc6834e00
  1. 2
      app/command/brand.php
  2. 6
      crmeb/jobs/OrderPartnerJob.php

@ -103,7 +103,7 @@ class brand extends Command
->update([ ->update([
'brand_integral' => 0, 'brand_integral' => 0,
'all_value' => 0, 'all_value' => 0,
'brokerage_price' => $v['brokerage_price']+$growth_num 'brokerage_price' => $v['']+$growth_num
]); ]);
Db::commit(); Db::commit();

@ -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,
]; ];
} }

Loading…
Cancel
Save