WIN-2308041133\Administrator 3 months ago
parent
commit
cf21733a3b
1 changed files with 4 additions and 2 deletions
  1. 4 2
      app/common/repositories/store/order/StoreOrderRepository.php

+ 4 - 2
app/common/repositories/store/order/StoreOrderRepository.php

@@ -3232,13 +3232,14 @@ class StoreOrderRepository extends BaseRepository
     {
         try {
 
-
+            $storeProduct = app()->make(Product::class);
             // 构建待核销商品的数量映射
             $status = 2;
 //            foreach ($data as $v) {
 //                $splitData[$v['product_id']] = $v['num'];
 //
 //            }
+            $user_name = User::where('uid', $order->uid)->value('nickname');
             foreach ($order['orderProduct'] as $k => $v){
                 $num=0;
                 $cart_info = StoreCart::where(['cart_id' => $v->cart_id, 'product_id' => $v->product_id])->find();
@@ -3258,7 +3259,8 @@ class StoreOrderRepository extends BaseRepository
                 }
                 $balance = bcsub($cart_info['cart_num'], $verify_num, 0);
 //                $v['verify_num'] = \app\common\model\store\order\StoreCart::where('product_id',$v['product_id'])->where('cart_id',$v['cart_id'])->value('verify_num');
-                self::verifyRecord($order->order_id,$serviceId , $v->product_id, $num,$balance);
+                $store_name = $storeProduct->where('product_id', $v->product_id)->value('store_name');
+                self::verifyRecord($order->order_id,$serviceId , $v->product_id, $num,$balance,$user_name,$store_name);
 //                ($order_id,$uid,$product_id,$num,$balance,$mark){
             }
             // 调用订单分割函数进行订单核销操作,并更新订单对象