quguofeng 2 年之前
父節點
當前提交
282a24df89
共有 1 個文件被更改,包括 8 次插入7 次删除
  1. 8 7
      app/common/repositories/store/order/StoreOrderRepository.php

+ 8 - 7
app/common/repositories/store/order/StoreOrderRepository.php

@@ -759,14 +759,15 @@ class StoreOrderRepository extends BaseRepository
         }
         $integral = $residue_percentage * $order->total_price / 100;
         if($integral){
-            app()->make(UserBillRepository::class)->incBill($user->uid, 'integral', 'rebate', [
-                'link_id' => $order->order_id,
-                'status' => 0,
-                'title' => '超出比例发放红包米',
+            //增加记录
+            $arr = [
+                'status' => 1,
+                'mark'   => '分销超出折扣比,返利'.$integral.'红包米',
                 'number' => $integral,
-                'mark' => '分销超出折扣比,返利'.$integral.'红包米',
-                'balance' => $user->integral + $integral
-            ]);
+                'balance'=> $user->integral + $integral,
+            ];
+            $user_make = app()->make(UserRepository::class);
+            $user_make->incIntegral($user->uid,$integral,'超出比例发放红包米','rebate',$arr);
         }
     }
     /**