From aef9567d2ac4797924cb2eb3b5109b5b4b2f891e Mon Sep 17 00:00:00 2001 From: Cat <14369594+M1Screw@users.noreply.github.com> Date: Mon, 12 Dec 2022 16:41:27 +0800 Subject: [PATCH] fix: git commit error in db file --- .../20000101000000_init_database.php.new | 16 ++++++++-------- src/Controllers/Admin/NodeController.php | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/db/migrations/20000101000000_init_database.php.new b/db/migrations/20000101000000_init_database.php.new index cbf6e172e2..6179390fdf 100644 --- a/db/migrations/20000101000000_init_database.php.new +++ b/db/migrations/20000101000000_init_database.php.new @@ -324,15 +324,15 @@ final class InitDatabase extends AbstractMigration $this->table('gift_card', [ 'id' => false, 'primary_key' => [ 'id' ]]) ->addColumn('id', 'biginteger', [ 'identity' => true,'signed' => false ]) - ->addColumn('card', 'text', array('comment' => '卡号')) - ->addColumn('balance', 'integer', array('comment' => '余额')) - ->addColumn('created_at', 'integer', array('comment' => '创建时间')) - ->addColumn('status', 'integer', array('comment' => '使用状态')) - ->addColumn('used_at', 'integer', array('comment' => '使用时间')) - ->addColumn('use_user', 'integer', array('comment' => '使用用户')) - ->create(); - ->addColumn('status', 'text', [ 'comment' => '订单状态' ]) + ->addColumn('card', 'text', ['comment' => '卡号']) + ->addColumn('balance', 'integer', ['comment' => '余额']) + ->addColumn('create_time', 'integer', ['comment' => '创建时间']) + ->addColumn('status', 'integer', ['comment' => '使用状态']) + ->addColumn('use_time', 'integer', ['comment' => '使用时间']) + ->addColumn('use_user', 'integer', ['comment' => '使用用户']) + ->addIndex([ 'id' ]) ->addIndex([ 'status' ]) + ->create(); } public function down(): void diff --git a/src/Controllers/Admin/NodeController.php b/src/Controllers/Admin/NodeController.php index 842b7e210c..309c648d43 100644 --- a/src/Controllers/Admin/NodeController.php +++ b/src/Controllers/Admin/NodeController.php @@ -120,12 +120,12 @@ public function add(Request $request, Response $response, array $args): Response $node->node_class = $request->getParam('node_class'); - if ($request->getParam('node_bandwidth_limit') === null || $request->getParam('node_bandwidth_limit') === '') { + if ($request->getParam('node_bandwidth_limit') === null || $request->getParam('node_bandwidth_limit') === '') { $node->node_bandwidth_limit = 0; } else { $node->node_bandwidth_limit = $request->getParam('node_bandwidth_limit') * 1024 * 1024 * 1024; } - + $node->bandwidthlimit_resetday = $request->getParam('bandwidthlimit_resetday'); $node->password = Tools::genRandomChar(32);