diff --git a/app/data/controller/api/auth/Order.php b/app/data/controller/api/auth/Order.php index 5ec6b280a..db2e2dc21 100644 --- a/app/data/controller/api/auth/Order.php +++ b/app/data/controller/api/auth/Order.php @@ -114,7 +114,7 @@ class Order extends Auth 'goods_spec' => $goodsItem['goods_spec'], // 数量处理 'stock_sales' => $count, - 'truck_code' => $goodsInfo['truck_code'], + 'truck_code' => $goodsInfo['truck_code'], 'truck_count' => $goodsItem['number_express'] * $count, // 费用字段 'price_market' => $goodsItem['price_market'], @@ -149,7 +149,9 @@ class Order extends Auth $this->app->db->name('ShopOrder')->insert($order); $this->app->db->name('ShopOrderItem')->insertAll($items); // 同步商品库存销量 - foreach ($codes as $code) GoodsService::instance()->syncStock($code); + foreach ($codes as $code) { + GoodsService::instance()->syncStock($code); + } // 触发订单创建事件 $this->app->event->trigger('ShopOrderCreate', $order['order_no']); // 组装订单商品数据 diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 676ad3dab..902b4fabf 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -857,7 +857,7 @@ "source": { "type": "git", "url": "https://gitee.com/zoujingli/ThinkLibrary", - "reference": "1fdad1dfac6b976c6e6ff878092e4dbf12e79e3f" + "reference": "d37728d027ac68c0798288f1e663599bb642021d" }, "require": { "ext-curl": "*", @@ -867,7 +867,7 @@ "ext-mbstring": "*", "topthink/framework": "^6.0" }, - "time": "2021-01-29T08:07:24+00:00", + "time": "2021-01-31T06:25:09+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index 244ee4bb7..f95a4f9ef 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\admin\\Library', diff --git a/vendor/zoujingli/think-library/readme.md b/vendor/zoujingli/think-library/readme.md index 8dc91f50b..54f415db2 100644 --- a/vendor/zoujingli/think-library/readme.md +++ b/vendor/zoujingli/think-library/readme.md @@ -1,13 +1,13 @@ [![Latest Stable Version](https://poser.pugx.org/zoujingli/think-library/v/stable)](https://packagist.org/packages/zoujingli/think-library) [![Total Downloads](https://poser.pugx.org/zoujingli/think-library/downloads)](https://packagist.org/packages/zoujingli/think-library) [![Latest Unstable Version](https://poser.pugx.org/zoujingli/think-library/v/unstable)](https://packagist.org/packages/zoujingli/think-library) [![License](https://poser.pugx.org/zoujingli/think-library/license)](https://packagist.org/packages/zoujingli/think-library) # ThinkLibrary 6.0 for ThinkPHP 6.0 -ThinkLibrary 6.0 是针对 ThinkPHP 6.0 版本封装的一套工具类库,方便快速构建 WEB 应用。 +ThinkLibrary 6.0 是针对 ThinkPHP 6.0 版本封装的一套工具类库,方便快速构建 Web 应用。 ## 包含组件 * 数据列表展示(可带高级搜索器) * FORM表单处理器(表单展示及数据入库) * 数据状态快速处理(数据指定字段更新,支持多字段同时) -* 数据安全删除处理(硬删除 + 软删除,is_deleted 字段存在则自动软删除) +* 数据安全删除处理(硬删除 + 软删除,is_deleted 或 deleted 字段存在则自动软删除) * 文件存储通用组件(本地服务存储 + 七牛云存储 + 阿里云OSS存储 + 腾讯云COS存储) * 通用数据保存更新(通过 key 值及 where 判定是否存在,存在则更新,不存在则新增) * 通用网络请求 (支持 get 及 post,可配置请求证书等) diff --git a/vendor/zoujingli/think-library/src/command/Database.php b/vendor/zoujingli/think-library/src/command/Database.php index 7f60b4758..b315f01a4 100644 --- a/vendor/zoujingli/think-library/src/command/Database.php +++ b/vendor/zoujingli/think-library/src/command/Database.php @@ -93,7 +93,6 @@ class Database extends Command protected function getTables(): array { $tables = []; - $this->app->db->getTable(); foreach ($this->app->db->query("show tables") as $item) { $tables = array_merge($tables, array_values($item)); } diff --git a/vendor/zoujingli/think-library/src/extend/JsonRpcClient.php b/vendor/zoujingli/think-library/src/extend/JsonRpcClient.php index 7c433881f..2e7b71be2 100644 --- a/vendor/zoujingli/think-library/src/extend/JsonRpcClient.php +++ b/vendor/zoujingli/think-library/src/extend/JsonRpcClient.php @@ -74,8 +74,7 @@ class JsonRpcClient if ($fp = fopen($this->proxy, 'r', false, stream_context_create($options))) { $response = ''; while ($row = fgets($fp)) $response .= trim($row) . "\n"; - fclose($fp); - $response = json_decode($response, true); + [, $response] = [fclose($fp), json_decode($response, true)]; } else { throw new Exception("无法连接到 {$this->proxy}"); }