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();