Просмотр исходного кода

Merge branch 'master' into huangfamily

family 1 год назад
Родитель
Сommit
a0e04cc5fc

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

@@ -6606,6 +6606,7 @@ class StoreOrderRepository extends BaseRepository
6606 6606
 
6607 6607
     public function douhuomall_delivery()
6608 6608
     {
6609
+        set_time_limit(0);
6609 6610
         try {
6610 6611
             $order = Db::name('store_order')->where('status', 0)->where('pay_type', '>', 0)->where('douhuomall', 1)->where('douhuomall_status', 9)->select();
6611 6612
             if ($order) {
@@ -6634,7 +6635,7 @@ class StoreOrderRepository extends BaseRepository
6634 6635
 //                        $address_id = $address_id[0];
6635 6636
                     }
6636 6637
 //                    $address_id = $value['address_id'];
6637
-                    $cart_id = $value['cart_id'];
6638
+                    $cart_id = [$value['cart_id']];
6638 6639
                     $cartIds = Db::name('store_cart')->where('cart_id', 'in', $cart_id)->select()->toArray();
6639 6640
 //                    $address = $value['user_address'];
6640 6641
                     log::info("传参数据22========");
@@ -6653,7 +6654,7 @@ class StoreOrderRepository extends BaseRepository
6653 6654
                         log::info("传参数据11111========");
6654 6655
                         log::info($address);
6655 6656
                         $res = GongApiRequest::submit($address_id, $sku_id, $address, $third_order, $other, $receiver, $receiver_phone);
6656
-
6657
+                        echo "传参数据11111========";
6657 6658
                         $u['douhuomall_status'] = 0;
6658 6659
                         $u['douhuomall_msg'] = $res['error_msg'] ?? '';
6659 6660
                         if ($res['error_code'] == 0) {
@@ -6673,6 +6674,7 @@ class StoreOrderRepository extends BaseRepository
6673 6674
             $this->douhuomall_order();
6674 6675
         } catch (Exception $e) {
6675 6676
             Db::name('log')->insert(['data' => '供应链发货:' . $e->getFile() . ':' . $e->getLine() . '【' . $e->getMessage() . '】']);
6677
+            echo '供应链发货:' . $e->getFile() . ':' . $e->getLine() . '【' . $e->getMessage() . '】';
6676 6678
         }
6677 6679
     }
6678 6680
 

+ 4 - 4
app/controller/api/store/order/StoreOrder.php

@@ -204,10 +204,10 @@ class StoreOrder extends BaseController
204 204
 
205 205
         //log::info("计算养老金 good_id: {$good_id},price{$total_price},yanglao:{$yanglao}");
206 206
         // $price = $decScore = $decJingScore =  0;
207
-        //foreach ($cartIds as $k=>$item){
207
+        foreach ($cartIds as $k=>$item){
208 208
 
209
-        // $checkGong = $gong -> checkGong($item['product_id'],$item['product_attr_unique'],$item['cart_num'],$uid,$addressId);
210
-        // if(isset($checkGong['code']) && $checkGong['code'] == -1) return app('json')->fail($checkGong['message']);
209
+        $checkGong = $gong -> checkGong($item['product_id'],$item['product_attr_unique'],$item['cart_num'],$uid,$addressId);
210
+        if(isset($checkGong['code']) && $checkGong['code'] == -1) return app('json')->fail($checkGong['message']);
211 211
         // $money=Db::name('store_product_attr_value')->where('unique',$item['product_attr_unique'])->value('price');
212 212
         // $price += bcmul($money, $item['cart_num'], 2);
213 213
 
@@ -228,7 +228,7 @@ class StoreOrder extends BaseController
228 228
         //     }
229 229
         //     $decJingScore += $productDecJingdou;
230 230
         // }
231
-        //}
231
+        }
232 232
 
233 233
 
234 234
         // if (!$decScore && !$decJingScore) {