|
|
@@ -3233,6 +3233,7 @@ class StoreOrderRepository extends BaseRepository
|
|
|
try {
|
|
|
|
|
|
$storeProduct = app()->make(Product::class);
|
|
|
+// $storeOrder = app()->make(StoreOrder::class);
|
|
|
// 构建待核销商品的数量映射
|
|
|
$status = 2;
|
|
|
// foreach ($data as $v) {
|
|
|
@@ -3260,8 +3261,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');
|
|
|
$store_name = $storeProduct->where('product_id', $v->product_id)->value('store_name');
|
|
|
- $order_sn = $storeProduct->where('product_id', $v->product_id)->value('order_sn');
|
|
|
- self::verifyRecord($order_sn,$serviceId , $v->product_id, $num,$balance,$user_name,$store_name);
|
|
|
+// $order_sn = $storeOrder->where('order', $v->product_id)->value('order_sn');
|
|
|
+ self::verifyRecord($order->order_sn,$serviceId , $v->product_id, $num,$balance,$user_name,$store_name);
|
|
|
// ($order_id,$uid,$product_id,$num,$balance,$mark){
|
|
|
}
|
|
|
// 调用订单分割函数进行订单核销操作,并更新订单对象
|
|
|
@@ -3326,9 +3327,9 @@ class StoreOrderRepository extends BaseRepository
|
|
|
// $this->confirmOil($order);
|
|
|
}
|
|
|
|
|
|
- public function verifyRecord($order_id,$uid,$product_id,$num,$balance,$user_name,$product_name){
|
|
|
+ public function verifyRecord($order_sn,$uid,$product_id,$num,$balance,$user_name,$product_name){
|
|
|
$mark = $user_name.'服务中心核销'.$product_name.'商品'.$num.'件';
|
|
|
- VerifyRecord::create(['order_sn'=>$order_id,'uid'=>$uid,'product_id'=>$product_id,'num'=>$num,'balance'=>$balance,'mark'=>$mark,'status'=>0,'verify_time'=>time()]);
|
|
|
+ VerifyRecord::create(['order_sn'=>$order_sn,'uid'=>$uid,'product_id'=>$product_id,'num'=>$num,'balance'=>$balance,'mark'=>$mark,'status'=>0,'verify_time'=>time()]);
|
|
|
return true;
|
|
|
}
|
|
|
|