|
|
@@ -3747,6 +3747,10 @@ class StoreOrderRepository extends BaseRepository
|
|
3747
|
3747
|
//推荐养老金添加
|
|
3748
|
3748
|
$pvfee = bcmul($order['total_price'], $sanfangfenpei['pv'], 2);
|
|
3749
|
3749
|
$zijiUser = Db::name("user")->where('uid', $order["uid"])->find();
|
|
|
3750
|
+ // 老用户发红包奖励
|
|
|
3751
|
+ if($zijiUser['is_old'] == 1){
|
|
|
3752
|
+ $this->giveHongBao($order["uid"], $pvfee, $order_id, '消费赠送红包');
|
|
|
3753
|
+ }
|
|
3750
|
3754
|
$sprerdUser = Db::name("user")->where('uid', $zijiUser['spread_uid'])->find();
|
|
3751
|
3755
|
//不为空的时候进行添加推荐奖励
|
|
3752
|
3756
|
if ($sprerdUser) {
|