mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
f6184c15c5
commit
7580ee8019
8
composer.lock
generated
8
composer.lock
generated
@ -909,12 +909,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||
"reference": "a6b2f3929c9853c700e45e260c2eaf0ed0aeda3f"
|
||||
"reference": "b9e3024d655552b3d6836c8d415f042d85504a8c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a6b2f3929c9853c700e45e260c2eaf0ed0aeda3f",
|
||||
"reference": "a6b2f3929c9853c700e45e260c2eaf0ed0aeda3f",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/b9e3024d655552b3d6836c8d415f042d85504a8c",
|
||||
"reference": "b9e3024d655552b3d6836c8d415f042d85504a8c",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -958,7 +958,7 @@
|
||||
],
|
||||
"description": "ThinkPHP v6.0 Development Library",
|
||||
"homepage": "http://framework.thinkadmin.top",
|
||||
"time": "2020-04-09T14:06:42+00:00"
|
||||
"time": "2020-04-10T02:34:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "zoujingli/wechat-developer",
|
||||
|
2
vendor/composer/autoload_classmap.php
vendored
2
vendor/composer/autoload_classmap.php
vendored
@ -257,6 +257,8 @@ return array(
|
||||
'think\\admin\\command\\Install' => $vendorDir . '/zoujingli/think-library/src/command/Install.php',
|
||||
'think\\admin\\command\\Queue' => $vendorDir . '/zoujingli/think-library/src/command/Queue.php',
|
||||
'think\\admin\\command\\Version' => $vendorDir . '/zoujingli/think-library/src/command/Version.php',
|
||||
'think\\admin\\command\\database\\Optimize' => $vendorDir . '/zoujingli/think-library/src/command/database/Optimize.php',
|
||||
'think\\admin\\command\\database\\Repair' => $vendorDir . '/zoujingli/think-library/src/command/database/Repair.php',
|
||||
'think\\admin\\command\\queue\\CleanQueue' => $vendorDir . '/zoujingli/think-library/src/command/queue/CleanQueue.php',
|
||||
'think\\admin\\command\\queue\\ListenQueue' => $vendorDir . '/zoujingli/think-library/src/command/queue/ListenQueue.php',
|
||||
'think\\admin\\command\\queue\\QueryQueue' => $vendorDir . '/zoujingli/think-library/src/command/queue/QueryQueue.php',
|
||||
|
2
vendor/composer/autoload_static.php
vendored
2
vendor/composer/autoload_static.php
vendored
@ -390,6 +390,8 @@ class ComposerStaticInit4ceee63a2cdf20349907f5909444af96
|
||||
'think\\admin\\command\\Install' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/Install.php',
|
||||
'think\\admin\\command\\Queue' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/Queue.php',
|
||||
'think\\admin\\command\\Version' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/Version.php',
|
||||
'think\\admin\\command\\database\\Optimize' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/database/Optimize.php',
|
||||
'think\\admin\\command\\database\\Repair' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/database/Repair.php',
|
||||
'think\\admin\\command\\queue\\CleanQueue' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/queue/CleanQueue.php',
|
||||
'think\\admin\\command\\queue\\ListenQueue' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/queue/ListenQueue.php',
|
||||
'think\\admin\\command\\queue\\QueryQueue' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/queue/QueryQueue.php',
|
||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -935,12 +935,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||
"reference": "a6b2f3929c9853c700e45e260c2eaf0ed0aeda3f"
|
||||
"reference": "b9e3024d655552b3d6836c8d415f042d85504a8c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a6b2f3929c9853c700e45e260c2eaf0ed0aeda3f",
|
||||
"reference": "a6b2f3929c9853c700e45e260c2eaf0ed0aeda3f",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/b9e3024d655552b3d6836c8d415f042d85504a8c",
|
||||
"reference": "b9e3024d655552b3d6836c8d415f042d85504a8c",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -956,7 +956,7 @@
|
||||
"ext-json": "*",
|
||||
"topthink/framework": "^6.0"
|
||||
},
|
||||
"time": "2020-04-09T14:06:42+00:00",
|
||||
"time": "2020-04-10T02:34:55+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"think": {
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2020-04-09 22:16:17
|
||||
// This file is automatically generated at:2020-04-10 10:41:39
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\app\\Service',
|
||||
|
@ -83,6 +83,7 @@ class Library extends Service
|
||||
$this->commands([
|
||||
'think\admin\command\Install',
|
||||
'think\admin\command\Version',
|
||||
// 系统异步任务指令
|
||||
'think\admin\command\queue\CleanQueue',
|
||||
'think\admin\command\queue\WorkQueue',
|
||||
'think\admin\command\queue\StopQueue',
|
||||
@ -90,6 +91,9 @@ class Library extends Service
|
||||
'think\admin\command\queue\StartQueue',
|
||||
'think\admin\command\queue\QueryQueue',
|
||||
'think\admin\command\queue\ListenQueue',
|
||||
// 数据库表优化指令
|
||||
'think\admin\command\database\Optimize',
|
||||
'think\admin\command\database\Repair',
|
||||
]);
|
||||
}
|
||||
}
|
60
vendor/zoujingli/think-library/src/command/database/Optimize.php
vendored
Normal file
60
vendor/zoujingli/think-library/src/command/database/Optimize.php
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2020 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://gitee.com/zoujingli/ThinkLibrary
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/ThinkLibrary
|
||||
// | github 代码仓库:https://github.com/zoujingli/ThinkLibrary
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace think\admin\command\database;
|
||||
|
||||
use think\admin\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
|
||||
/**
|
||||
* 数据库优化指令
|
||||
* Class Optimize
|
||||
* @package think\admin\command
|
||||
*/
|
||||
class Optimize extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('xadmin:optimize');
|
||||
$this->setDescription("Attempt to optimize all data tables");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Input $input
|
||||
* @param Output $output
|
||||
* @throws \think\admin\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$tables = [];
|
||||
$this->setQueueProgress(2, "正在获取需要优化的数据表", 0);
|
||||
foreach ($this->app->db->query("show tables") as $item) {
|
||||
$tables = array_merge($tables, array_values($item));
|
||||
}
|
||||
list($total, $used) = [count($tables), 0];
|
||||
$this->setQueueProgress(2, "总共需要优化 {$total} 张数据表", 0);
|
||||
foreach ($tables as $table) {
|
||||
$stridx = str_pad(++$used, strlen("{$total}"), ' ', STR_PAD_LEFT) . "/{$total}";
|
||||
$this->setQueueProgress(2, "[{$stridx}] 正在优化数据表 {$table}", $used / $total * 100);
|
||||
$this->app->db->query("OPTIMIZE TABLE `{$table}`");
|
||||
}
|
||||
$this->setQueueMessage(3, '数据库优化完成!');
|
||||
}
|
||||
|
||||
}
|
59
vendor/zoujingli/think-library/src/command/database/Repair.php
vendored
Normal file
59
vendor/zoujingli/think-library/src/command/database/Repair.php
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2020 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://gitee.com/zoujingli/ThinkLibrary
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/ThinkLibrary
|
||||
// | github 代码仓库:https://github.com/zoujingli/ThinkLibrary
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace think\admin\command\database;
|
||||
|
||||
use think\admin\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
|
||||
/**
|
||||
* 数据库修复指令
|
||||
* Class Repair
|
||||
* @package think\admin\command\database
|
||||
*/
|
||||
class Repair extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('xadmin:repair');
|
||||
$this->setDescription("Attempt to repair all data tables");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Input $input
|
||||
* @param Output $output
|
||||
* @throws \think\admin\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$tables = [];
|
||||
$this->setQueueProgress(2, "正在获取需要修复的数据表", 0);
|
||||
foreach ($this->app->db->query("show tables") as $item) {
|
||||
$tables = array_merge($tables, array_values($item));
|
||||
}
|
||||
list($total, $used) = [count($tables), 0];
|
||||
$this->setQueueProgress(2, "总共需要修复 {$total} 张数据表", 0);
|
||||
foreach ($tables as $table) {
|
||||
$stridx = str_pad(++$used, strlen("{$total}"), ' ', STR_PAD_LEFT) . "/{$total}";
|
||||
$this->setQueueProgress(2, "[{$stridx}] 正在修复数据表 {$table}", $used / $total * 100);
|
||||
$this->app->db->query("REPAIR TABLE `{$table}`");
|
||||
}
|
||||
$this->setQueueMessage(3, '数据库修复完成!');
|
||||
}
|
||||
}
|
@ -48,6 +48,7 @@ class CleanQueue extends Queue
|
||||
* @param Output $output
|
||||
* @throws \think\admin\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
protected function execute(Input $input, Output $output)
|
||||
|
Loading…
x
Reference in New Issue
Block a user