diff --git a/app/Http/Controllers/Business/BusinessOrderController.php b/app/Http/Controllers/Business/BusinessOrderController.php index b9fc414..9ad34da 100644 --- a/app/Http/Controllers/Business/BusinessOrderController.php +++ b/app/Http/Controllers/Business/BusinessOrderController.php @@ -154,7 +154,6 @@ class BusinessOrderController extends Controller ->where('plat_id', Shop::$PLAT_KTT) ->pluck('id'); $builder = BusinessOrder::query() - ->where('order_sn', 'PO-230728-287005797932723') ->with('items') ->whereIn('shop_id', $shopIds) ->filter(); diff --git a/app/Services/Ship/WayBillService.php b/app/Services/Ship/WayBillService.php index 84bac26..3d8661b 100644 --- a/app/Services/Ship/WayBillService.php +++ b/app/Services/Ship/WayBillService.php @@ -18,10 +18,6 @@ class WayBillService // 已下单过的订单不再下单 $contents = []; foreach ($this->orders as $shopId => $order) { - // 花落测试; - if ($shopId !== 6) { - continue; - } // 订单取消的情况暂不处理 $shop = $this->getShop($shopId); $faceSheet = new FaceSheet(); @@ -29,6 +25,7 @@ class WayBillService foreach ($order as $item) { [$sender, $orderInfo, $wpCode] = $this->prepareRequest($item, $shop); $waybill = $this->saveWayBill($item, $shop); + if (empty($waybill->id)) { $resp = $faceSheet->getWayBill($sender, $orderInfo, $wpCode); if (isset($resp['pdd_waybill_get_response'])) { diff --git a/database/migrations/2023_07_26_184009_create_shop_senders_table.php b/database/migrations/2023_07_26_184009_create_shop_senders_table.php index 61a2e9e..969d663 100644 --- a/database/migrations/2023_07_26_184009_create_shop_senders_table.php +++ b/database/migrations/2023_07_26_184009_create_shop_senders_table.php @@ -26,7 +26,7 @@ class CreateShopSendersTable extends Migration $table->string('district'); $table->string('detail'); $table->string('name')->nullable()->default(''); - $table->integer('mobile')->nullable(); + $table->string('mobile', 18)->nullable(); $table->integer('sort')->default(1); $table->integer('status')->default(1); $table->string('wp_code')->default('');