Browse Source

删除订单商品

sunhao 5 years ago
parent
commit
dc34813965

+ 1 - 1
app/Console/Commands/SyncOrderToMj.php

52
             $order = Order::select('eshopCode','outerCode','status','customerName','shippingType','expressCompanyCode','expressCompanyName','receiverName','receiverMobile','receiverPhone','receiverState','receiverCity','receiverDistrict','receiverStreet','receiverAddress','buyerPostageFee','discountFee','adjustFee','serviceFee','paymentMethod','paymentType','paymentAccount','paymentTime','receivedAmount','buyerMemo','sellerMemo','createTime','modifyTime')->where('id', $id)->first();
52
             $order = Order::select('eshopCode','outerCode','status','customerName','shippingType','expressCompanyCode','expressCompanyName','receiverName','receiverMobile','receiverPhone','receiverState','receiverCity','receiverDistrict','receiverStreet','receiverAddress','buyerPostageFee','discountFee','adjustFee','serviceFee','paymentMethod','paymentType','paymentAccount','paymentTime','receivedAmount','buyerMemo','sellerMemo','createTime','modifyTime')->where('id', $id)->first();
53
 
53
 
54
             $order = json_decode(json_encode($order), true);
54
             $order = json_decode(json_encode($order), true);
55
-            $skus = DB::table('order_goods_skus')->where('order_id', $id)->get();
55
+            $skus = DB::table('order_goods_skus')->where('order_id', $id)->where('is_del', 0)->get();
56
             $skus = json_decode(json_encode($skus), true);
56
             $skus = json_decode(json_encode($skus), true);
57
             foreach($skus as $k=>$v){
57
             foreach($skus as $k=>$v){
58
                 $sku_info = GoodsSkus::where('id', $v['sku_id'])->first();
58
                 $sku_info = GoodsSkus::where('id', $v['sku_id'])->first();

+ 1 - 1
app/Http/Controllers/Admin/OrderController.php

1601
             $order = Order::select('eshopCode','outerCode','status','customerName','shippingType','expressCompanyCode','expressCompanyName','receiverName','receiverMobile','receiverPhone','receiverState','receiverCity','receiverDistrict','receiverStreet','receiverAddress','buyerPostageFee','discountFee','adjustFee','serviceFee','paymentMethod','paymentType','paymentAccount','paymentTime','receivedAmount','buyerMemo','sellerMemo','createTime','modifyTime')->where('id', $id)->first();
1601
             $order = Order::select('eshopCode','outerCode','status','customerName','shippingType','expressCompanyCode','expressCompanyName','receiverName','receiverMobile','receiverPhone','receiverState','receiverCity','receiverDistrict','receiverStreet','receiverAddress','buyerPostageFee','discountFee','adjustFee','serviceFee','paymentMethod','paymentType','paymentAccount','paymentTime','receivedAmount','buyerMemo','sellerMemo','createTime','modifyTime')->where('id', $id)->first();
1602
 
1602
 
1603
             $order = json_decode(json_encode($order), true);
1603
             $order = json_decode(json_encode($order), true);
1604
-            $skus = DB::table('order_goods_skus')->where('order_id', $id)->get();
1604
+            $skus = DB::table('order_goods_skus')->where('is_del', 0)->where('order_id', $id)->get();
1605
             $skus = json_decode(json_encode($skus), true);
1605
             $skus = json_decode(json_encode($skus), true);
1606
             foreach($skus as $k=>$v){
1606
             foreach($skus as $k=>$v){
1607
                 $sku_info = GoodsSkus::where('id', $v['sku_id'])->first();
1607
                 $sku_info = GoodsSkus::where('id', $v['sku_id'])->first();