ソースを参照

赠送京豆调整

xialei 1 年間 前
コミット
3f98c92890
共有1 個のファイルを変更した7 個の追加3 個の削除を含む
  1. 7 3
      app/controller/api/Notify.php

+ 7 - 3
app/controller/api/Notify.php

@@ -673,8 +673,8 @@ class Notify
673 673
                                     }
674 674
 
675 675
                                     //锁客收益
676
-                                    if ($store_order_data['mer_id'] > 0) {
677
-                                        $merchant_data = Db::name('merchant')->where('mer_id', $store_order_data['mer_id'])->find();
676
+                                    if ($user_data['mer_id'] != 0) {
677
+                                        $merchant_data = Db::name('merchant')->where('mer_id', $user_data['mer_id'])->find();
678 678
                                         $merchant_user_data = Db::name('user')->where('uid', $merchant_data['uid'])->find();
679 679
                                         if (!empty($merchant_user_data)) {
680 680
                                             //给推广者分配佣金
@@ -682,8 +682,12 @@ class Notify
682 682
                                             $fgj_amount_10 = bcmul($pv * 0.1, 0.05, 2);//推广者的佣金抽10%到个人复购金
683 683
                                             $this->fugou_user_log($merchant_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
684 684
                                             //推广佣金
685
-                                            $this->bill_user_log($merchant_data['uid'], $yj_amount_90, $store_order_data['order_id'], 3, $group_order['group_order_sn'], '推广获得佣金' . $yj_amount_90, $store_order_data['mer_id'], 0);
685
+                                            $this->bill_user_log($merchant_data['uid'], $yj_amount_90, $store_order_data['order_id'], 3, $group_order['group_order_sn'], '推广获得佣金' . $yj_amount_90, $user_data['mer_id'], 0);
686 686
                                         }
687
+                                    }
688
+
689
+                                    //京豆赠送
690
+                                    if ($store_order_data['mer_id'] > 0) {
687 691
                                         /** @var OrderMerchantRepository $orderMerchantRepository */
688 692
                                         $orderMerchantRepository = app()->make(OrderMerchantRepository::class);
689 693
                                         $jdAndGonxianConfig = $orderMerchantRepository->getMerchantContribution($store_product_attr_value['extension_one']);