From 73e28e6caf1b0c2fa1a532c0e5a845a7be350408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=B8=96=E7=95=8C?= <642747453@qq.com> Date: Thu, 18 Aug 2022 12:44:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20#20220818=20=E5=A6=99=E9=80=89=E5=95=86?= =?UTF-8?q?=E5=9F=8E=E5=BA=93=E5=AD=98=E5=90=8C=E6=AD=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/Business/MiaoXuan/Goods.php | 3 ++- database/migrations/2014_10_12_000000_create_users_table.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Services/Business/MiaoXuan/Goods.php b/app/Services/Business/MiaoXuan/Goods.php index 8276fa6..79cac25 100644 --- a/app/Services/Business/MiaoXuan/Goods.php +++ b/app/Services/Business/MiaoXuan/Goods.php @@ -18,13 +18,14 @@ class Goods public static function incrQuantity($shopId, $quantity, $businessGoods) { + [$goodsCode, $skuCode] = explode('_', $businessGoods['external_sku_id']); return [ 'data' => [ 'stock' => $quantity, 'business_sku_id' => $businessGoods['sku_id'], 'business_goods_id' => $businessGoods['goods_id'], 'erp_shop_id' => $shopId, - 'erp_sku_id' => $businessGoods['external_sku_id'], + 'erp_sku_id' => $skuCode, ], 'type' => '更新库存', ]; diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 4ec42ab..305ba38 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -20,7 +20,7 @@ class CreateUsersTable extends Migration $table->string('email')->nullable()->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); - $table->string('api_token', 80)->unique()->nullable(false); + $table->string('api_token', 80)->unique(); $table->softDeletes(); $table->rememberToken(); $table->timestamps();