From 8b066365720980c3af01076146b25ed98221d876 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 29 Nov 2019 01:16:15 +0800 Subject: [PATCH] update --- app/Http/Controllers/UserController.php | 4 +++- install.sql | 3 ++- update.sql | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 262ea0ba..b6e2f5c4 100755 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -56,7 +56,9 @@ class UserController extends Controller 'is_admin', 'remind_expire', 'remind_traffic', - 'expired_at' + 'expired_at', + 'balance', + 'commission_balance' ]) ->first(); $user['avatar_url'] = 'https://cdn.v2ex.com/gravatar/' . md5($user->email) . '?s=64&d=identicon'; diff --git a/install.sql b/install.sql index caa9f6d7..ba253e8c 100644 --- a/install.sql +++ b/install.sql @@ -105,6 +105,7 @@ CREATE TABLE `v2_user` ( `invite_user_id` int(11) DEFAULT NULL, `email` varchar(64) NOT NULL, `password` varchar(64) NOT NULL, + `balance` int(11) NOT NULL DEFAULT '0', `commission_rate` int(11) DEFAULT NULL, `commission_balance` int(11) NOT NULL DEFAULT '0', `t` int(11) NOT NULL DEFAULT '0', @@ -132,4 +133,4 @@ CREATE TABLE `v2_user` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- 2019-11-27 11:46:36 \ No newline at end of file +-- 2019-11-28 17:14:25 \ No newline at end of file diff --git a/update.sql b/update.sql index 9fbef6fb..2af66de9 100644 --- a/update.sql +++ b/update.sql @@ -15,4 +15,6 @@ ALTER TABLE `v2_order` ADD `type` int(11) NOT NULL COMMENT '1新购2续费3升级' AFTER `plan_id`; /* 2019-11-27 */ ALTER TABLE `v2_user` -ADD `commission_rate` int(11) NULL AFTER `password`; \ No newline at end of file +ADD `commission_rate` int(11) NULL AFTER `password`; +ALTER TABLE `v2_user` +ADD `balance` int(11) NOT NULL DEFAULT '0' AFTER `password`; \ No newline at end of file