diff --git a/app/Services/ServerService.php b/app/Services/ServerService.php index a5b581b8..87a6f618 100644 --- a/app/Services/ServerService.php +++ b/app/Services/ServerService.php @@ -51,7 +51,7 @@ class ServerService foreach ($trojans as $k => $v) { $groupId = json_decode($trojans[$k]['group_id']); if (in_array($user->group_id, $groupId)) { - $vmesss[$k]['last_check_at'] = Cache::get(CacheKey::get('SERVER_TROJAN_LAST_CHECK_AT', $trojans[$k]['id'])); + $trojans[$k]['last_check_at'] = Cache::get(CacheKey::get('SERVER_TROJAN_LAST_CHECK_AT', $trojans[$k]['id'])); array_push($trojan, $trojans[$k]); } diff --git a/database/install.sql b/database/install.sql index 7e8d02ac..cac3e77d 100644 --- a/database/install.sql +++ b/database/install.sql @@ -27,6 +27,7 @@ CREATE TABLE `v2_coupon` ( `type` tinyint(1) NOT NULL, `value` int(11) NOT NULL, `limit_use` int(11) DEFAULT NULL, + `limit_plan_ids` varchar(255) DEFAULT NULL, `started_at` int(11) NOT NULL, `ended_at` int(11) NOT NULL, `created_at` int(11) NOT NULL, @@ -281,4 +282,4 @@ CREATE TABLE `v2_user` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- 2020-06-11 12:38:33 +-- 2020-06-13 10:43:44 diff --git a/database/update.sql b/database/update.sql index 8956e305..5cd4d5b7 100644 --- a/database/update.sql +++ b/database/update.sql @@ -280,3 +280,6 @@ ADD `rate` varchar(11) COLLATE 'utf8mb4_general_ci' NOT NULL AFTER `name`; ALTER TABLE `v2_server_log` ADD `method` varchar(255) NOT NULL AFTER `rate`; + +ALTER TABLE `v2_coupon` +ADD `limit_plan_ids` varchar(255) NULL AFTER `limit_use`;