root 5 years ago
parent
commit
7683ddc6e0
2 changed files with 6 additions and 3 deletions
  1. 1 1
      app/Console/Commands/CheckExpire.php
  2. 5 2
      update.sql

+ 1 - 1
app/Console/Commands/CheckExpire.php

@@ -41,7 +41,7 @@ class CheckExpire extends Command
     {
         $user = User::all();
         foreach ($user as $item) {
-            if ($item->expired_at < time()) {
+            if ($item->expired_at < time() || $item->u + $item->d >= $item->transfer_enable) {
                 $item->enable = 0;
             } else {
                 $item->enable = 1;

+ 5 - 2
update.sql

@@ -4,6 +4,9 @@ ALTER TABLE `v2_server`
 ADD `network` varchar(11) COLLATE 'utf8_general_ci' NOT NULL AFTER `rate`;
 ALTER TABLE `v2_server`
 ADD `settings` text COLLATE 'utf8_general_ci' NULL AFTER `network`;
-/* 2019-11-18 18:14:11 */
+/* 2019-11-18 */
 ALTER TABLE `v2_server`
-ADD `show` tinyint(1) NOT NULL DEFAULT '0' AFTER `settings`;
+ADD `show` tinyint(1) NOT NULL DEFAULT '0' AFTER `settings`;
+/* 2019-11-23 */
+ALTER TABLE `v2_user`
+CHANGE `enable` `enable` tinyint(1) NOT NULL DEFAULT '1' AFTER `transfer_enable`;