mirror of
https://github.com/v2board/v2board.git
synced 2025-01-10 08:09:10 +08:00
update
This commit is contained in:
parent
0b89446b63
commit
8c5b32de90
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2017-2019 Bruskyii Panda
|
Copyright (c) 2019 Tokumeikoi
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Console\Commands;
|
|
||||||
|
|
||||||
use Illuminate\Console\Command;
|
|
||||||
use App\Models\User;
|
|
||||||
use App\Utils\Helper;
|
|
||||||
|
|
||||||
class ImportReset extends Command
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The name and signature of the console command.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $signature = 'import:reset';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The console command description.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $description = '为导入用户重置所有uuid及token';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new command instance.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Execute the console command.
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function handle()
|
|
||||||
{
|
|
||||||
$user = User::all();
|
|
||||||
foreach ($user as $item) {
|
|
||||||
$item->v2ray_uuid = Helper::guid(true);
|
|
||||||
$item->token = Helper::guid();
|
|
||||||
$item->save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -54,7 +54,8 @@ class SendRemindMail extends Command
|
|||||||
'subject' => '在' . config('v2board.app_name', 'V2board') . '的服务即将到期',
|
'subject' => '在' . config('v2board.app_name', 'V2board') . '的服务即将到期',
|
||||||
'template_name' => 'mail.sendRemindExpire',
|
'template_name' => 'mail.sendRemindExpire',
|
||||||
'template_value' => [
|
'template_value' => [
|
||||||
'name' => config('v2board.app_name', 'V2Board')
|
'name' => config('v2board.app_name', 'V2Board'),
|
||||||
|
'url' => config('v2board.app_url')
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -71,7 +72,8 @@ class SendRemindMail extends Command
|
|||||||
'subject' => '在' . config('v2board.app_name', 'V2board') . '的流量使用已达到80%',
|
'subject' => '在' . config('v2board.app_name', 'V2board') . '的流量使用已达到80%',
|
||||||
'template_name' => 'mail.sendRemindTraffic',
|
'template_name' => 'mail.sendRemindTraffic',
|
||||||
'template_value' => [
|
'template_value' => [
|
||||||
'name' => config('v2board.app_name', 'V2Board')
|
'name' => config('v2board.app_name', 'V2Board'),
|
||||||
|
'url' => config('v2board.app_url')
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -10,21 +10,21 @@ use App\Models\ServerLog;
|
|||||||
use App\Utils\Helper;
|
use App\Utils\Helper;
|
||||||
use Illuminate\Support\Facades\Redis;
|
use Illuminate\Support\Facades\Redis;
|
||||||
|
|
||||||
class SystemCache extends Command
|
class V2boardCache extends Command
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The name and signature of the console command.
|
* The name and signature of the console command.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'system:cache';
|
protected $signature = 'v2board:cache';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command description.
|
* The console command description.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $description = '系统缓存任务';
|
protected $description = '缓存任务';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new command instance.
|
* Create a new command instance.
|
@ -24,12 +24,12 @@ class Kernel extends ConsoleKernel
|
|||||||
*/
|
*/
|
||||||
protected function schedule(Schedule $schedule)
|
protected function schedule(Schedule $schedule)
|
||||||
{
|
{
|
||||||
|
// v2board
|
||||||
|
$schedule->command('v2board:cache')->hourly();
|
||||||
// check
|
// check
|
||||||
$schedule->command('check:order')->everyMinute();
|
$schedule->command('check:order')->everyMinute();
|
||||||
$schedule->command('check:expire')->everyMinute();
|
$schedule->command('check:expire')->everyMinute();
|
||||||
$schedule->command('check:commission')->everyMinute();
|
$schedule->command('check:commission')->everyMinute();
|
||||||
// system cache
|
|
||||||
$schedule->command('system:cache')->hourly();
|
|
||||||
// reset
|
// reset
|
||||||
$schedule->command('reset:traffic')->monthlyOn(1, '00:00');
|
$schedule->command('reset:traffic')->monthlyOn(1, '00:00');
|
||||||
$schedule->command('reset:serverLog')->monthlyOn(1, '00:00');
|
$schedule->command('reset:serverLog')->monthlyOn(1, '00:00');
|
||||||
|
@ -38,7 +38,8 @@ class CommController extends Controller
|
|||||||
'mail.sendEmailVerify',
|
'mail.sendEmailVerify',
|
||||||
[
|
[
|
||||||
'code' => $code,
|
'code' => $code,
|
||||||
'name' => config('v2board.app_name', 'V2Board')
|
'name' => config('v2board.app_name', 'V2Board'),
|
||||||
|
'url' => config('v2board.app_url')
|
||||||
],
|
],
|
||||||
function ($message) use($email, $subject) {
|
function ($message) use($email, $subject) {
|
||||||
$message->to($email)->subject($subject);
|
$message->to($email)->subject($subject);
|
||||||
|
17
install.sql
17
install.sql
@ -17,6 +17,19 @@ CREATE TABLE `v2_invite_code` (
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `v2_mail_log`;
|
||||||
|
CREATE TABLE `v2_mail_log` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`email` varchar(64) NOT NULL,
|
||||||
|
`subject` varchar(255) NOT NULL,
|
||||||
|
`template_name` varchar(255) NOT NULL,
|
||||||
|
`error` varchar(255) DEFAULT NULL,
|
||||||
|
`created_at` int(11) NOT NULL,
|
||||||
|
`updated_at` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `v2_notice`;
|
DROP TABLE IF EXISTS `v2_notice`;
|
||||||
CREATE TABLE `v2_notice` (
|
CREATE TABLE `v2_notice` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
@ -74,8 +87,8 @@ DROP TABLE IF EXISTS `v2_server`;
|
|||||||
CREATE TABLE `v2_server` (
|
CREATE TABLE `v2_server` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`group_id` varchar(255) NOT NULL,
|
`group_id` varchar(255) NOT NULL,
|
||||||
`parent_id` int(11) DEFAULT NULL,
|
|
||||||
`name` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
|
`name` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
|
||||||
|
`parent_id` int(11) DEFAULT NULL,
|
||||||
`host` varchar(255) NOT NULL,
|
`host` varchar(255) NOT NULL,
|
||||||
`port` int(11) NOT NULL,
|
`port` int(11) NOT NULL,
|
||||||
`server_port` int(11) NOT NULL,
|
`server_port` int(11) NOT NULL,
|
||||||
@ -173,4 +186,4 @@ CREATE TABLE `v2_user` (
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
-- 2019-12-29 04:58:01
|
-- 2019-12-30 11:13:16
|
@ -59,6 +59,17 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="padding:0 0 27px;">
|
||||||
|
<table cellpadding="0" cellspacing="0" align="center" style="margin:0 auto !important;">
|
||||||
|
<tbody><tr>
|
||||||
|
<td style="font:14px/16px Open Sans, Arial, Verdana, sans-serif; color:#fff; mso-padding-alt:12px 18px; border-radius:5px;" bgcolor="#05365d">
|
||||||
|
<a target="_blank" style="text-decoration:none; color:#fff; display:block; padding:12px 18px;" href="{{$url}}">登录到{{$name}}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,6 +54,17 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="padding:0 0 27px;">
|
||||||
|
<table cellpadding="0" cellspacing="0" align="center" style="margin:0 auto !important;">
|
||||||
|
<tbody><tr>
|
||||||
|
<td style="font:14px/16px Open Sans, Arial, Verdana, sans-serif; color:#fff; mso-padding-alt:12px 18px; border-radius:5px;" bgcolor="#05365d">
|
||||||
|
<a target="_blank" style="text-decoration:none; color:#fff; display:block; padding:12px 18px;" href="{{$url}}">登录到{{$name}}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,6 +54,17 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="padding:0 0 27px;">
|
||||||
|
<table cellpadding="0" cellspacing="0" align="center" style="margin:0 auto !important;">
|
||||||
|
<tbody><tr>
|
||||||
|
<td style="font:14px/16px Open Sans, Arial, Verdana, sans-serif; color:#fff; mso-padding-alt:12px 18px; border-radius:5px;" bgcolor="#05365d">
|
||||||
|
<a target="_blank" style="text-decoration:none; color:#fff; display:block; padding:12px 18px;" href="{{$url}}">登录到{{$name}}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user