ComposerUpdate

This commit is contained in:
邹景立 2021-02-01 11:01:36 +08:00
parent 56b793ac5f
commit 04199613b8
6 changed files with 10 additions and 10 deletions

View File

@ -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']);
// 组装订单商品数据

View File

@ -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": {

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php
// This file is automatically generated at:2021-01-29 16:17:56
// This file is automatically generated at:2021-02-01 11:01:01
declare (strict_types = 1);
return array (
0 => 'think\\admin\\Library',

View File

@ -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可配置请求证书等

View File

@ -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));
}

View File

@ -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}");
}