修改系统兼容

This commit is contained in:
邹景立 2022-10-13 17:37:20 +08:00
parent 191fced9ec
commit e0fc5216e6
2 changed files with 48 additions and 11 deletions

View File

@ -156,20 +156,12 @@
<td><a target="_blank" href="https://thinkadmin.top">ThinkAdmin Version {$version|default='6.0.0'}</a></td>
</tr>
<tr>
<th class="nowrap text-center">服务器信息</th>
<th class="nowrap text-center">服务器系统</th>
<td>{:php_uname()}</td>
</tr>
<tr>
<th class="nowrap text-center">服务器软件</th>
<td>{$request->server('SERVER_SOFTWARE',php_sapi_name())}</td>
</tr>
<tr>
<th class="nowrap text-center">PHP 版本</th>
<td>PHP Version {$Think.const.PHP_VERSION}</td>
</tr>
<tr>
<th class="nowrap text-center">MySQL 版本</th>
<td>MySQL Version {$app->db->query('SELECT VERSION()')[0]['VERSION()']}</td>
<th class="nowrap text-center">服务器环境</th>
<td>{$request->server('SERVER_SOFTWARE',php_sapi_name())}PHP {$Think.const.PHP_VERSION}</td>
</tr>
</tbody>
</table>

View File

@ -0,0 +1,45 @@
<?php
use think\migration\Migrator;
/**
* 用户等级管理
*/
class BaseUserUpgrade extends Migrator
{
public function change()
{
// 当前操作
$table = "base_user_upgrade";
// 存在则跳过
if ($this->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();
}
}