From e0fc5216e6e808ded3d2656f6d95ec66fe504a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Thu, 13 Oct 2022 17:37:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B3=BB=E7=BB=9F=E5=85=BC?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/view/config/index.html | 14 ++---- .../20221013045838_base_user_upgrade.php | 45 +++++++++++++++++++ 2 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 database/migrations/20221013045838_base_user_upgrade.php diff --git a/app/admin/view/config/index.html b/app/admin/view/config/index.html index a6f7a6c74..aa42209f7 100644 --- a/app/admin/view/config/index.html +++ b/app/admin/view/config/index.html @@ -156,20 +156,12 @@ ThinkAdmin Version {$version|default='6.0.0'} - 服务器信息 + 服务器系统 {:php_uname()} - 服务器软件 - {$request->server('SERVER_SOFTWARE',php_sapi_name())} - - - PHP 版本 - PHP Version {$Think.const.PHP_VERSION} - - - MySQL 版本 - MySQL Version {$app->db->query('SELECT VERSION()')[0]['VERSION()']} + 服务器环境 + {$request->server('SERVER_SOFTWARE',php_sapi_name())},PHP {$Think.const.PHP_VERSION} diff --git a/database/migrations/20221013045838_base_user_upgrade.php b/database/migrations/20221013045838_base_user_upgrade.php new file mode 100644 index 000000000..6efd4e0f4 --- /dev/null +++ b/database/migrations/20221013045838_base_user_upgrade.php @@ -0,0 +1,45 @@ +hasTable($table)) { + return; + } + + // 创建数据表 + $this->table($table, [ + 'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '数据-用户-等级', + ]) + ->addColumn('name', 'string', ['limit' => 200, 'default' => '', 'comment' => '用户级别名称']) + ->addColumn('number', 'integer', ['limit' => 2, 'default' => 0, 'comment' => '用户级别序号']) + ->addColumn('rebate_rule', 'string', ['limit' => 255, 'default' => '', 'comment' => '用户奖利规则']) + ->addColumn('upgrade_type', 'integer', ['limit' => 1, 'default' => 0, 'comment' => '会员升级规则(0单个,1同时)']) + ->addColumn('upgrade_team', 'integer', ['limit' => 1, 'default' => 1, 'comment' => '团队人数统计(0不计,1累计)']) + ->addColumn('goods_vip_status', 'integer', ['limit' => 1, 'default' => 0, 'comment' => '入会礼包状态']) + ->addColumn('order_amount_status', 'integer', ['limit' => 1, 'default' => 0, 'comment' => '订单金额状态']) + ->addColumn('order_amount_number', 'decimal', ['precision' => 20, 'scale' => 2, 'default' => '0.00', 'comment' => '订单金额累计']) + ->addColumn('teams_users_status', 'integer', ['limit' => 1, 'default' => 0, 'comment' => '团队人数状态']) + ->addColumn('teams_users_number', 'integer', ['limit' => 20, 'default' => 0, 'comment' => '团队人数累计']) + ->addColumn('teams_direct_status', 'integer', ['limit' => 1, 'default' => 0, 'comment' => '直推人数状态']) + ->addColumn('teams_direct_number', 'integer', ['limit' => 20, 'default' => 0, 'comment' => '直推人数累计']) + ->addColumn('teams_indirect_status', 'integer', ['limit' => 1, 'default' => 0, 'comment' => '间推人数状态']) + ->addColumn('teams_indirect_number', 'integer', ['limit' => 20, 'default' => 0, 'comment' => '间推人数累计']) + ->addColumn('remark', 'string', ['limit' => 500, 'default' => '', 'comment' => '用户级别描述']) + ->addColumn('utime', 'integer', ['limit' => 20, 'default' => 0, 'comment' => '等级更新时间']) + ->addColumn('status', 'integer', ['limit' => 1, 'default' => 1, 'comment' => '用户等级状态(1使用,0禁用)']) + ->addColumn('create_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'comment' => '等级创建时间']) + ->save(); + } +}