Skip to content

Commit 8c5b32d

Browse files
committed
update
1 parent 0b89446 commit 8c5b32d

10 files changed

+60
-60
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017-2019 Bruskyii Panda
3+
Copyright (c) 2019 Tokumeikoi
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

app/Console/Commands/ImportReset.php

-49
This file was deleted.

app/Console/Commands/SendRemindMail.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ private function remindExpire ($user) {
5454
'subject' => '' . config('v2board.app_name', 'V2board') . '的服务即将到期',
5555
'template_name' => 'mail.sendRemindExpire',
5656
'template_value' => [
57-
'name' => config('v2board.app_name', 'V2Board')
57+
'name' => config('v2board.app_name', 'V2Board'),
58+
'url' => config('v2board.app_url')
5859
]
5960
]);
6061
}
@@ -71,7 +72,8 @@ private function remindTraffic ($user) {
7172
'subject' => '' . config('v2board.app_name', 'V2board') . '的流量使用已达到80%',
7273
'template_name' => 'mail.sendRemindTraffic',
7374
'template_value' => [
74-
'name' => config('v2board.app_name', 'V2Board')
75+
'name' => config('v2board.app_name', 'V2Board'),
76+
'url' => config('v2board.app_url')
7577
]
7678
]);
7779
}

app/Console/Commands/SystemCache.php app/Console/Commands/V2boardCache.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@
1010
use App\Utils\Helper;
1111
use Illuminate\Support\Facades\Redis;
1212

13-
class SystemCache extends Command
13+
class V2boardCache extends Command
1414
{
1515
/**
1616
* The name and signature of the console command.
1717
*
1818
* @var string
1919
*/
20-
protected $signature = 'system:cache';
20+
protected $signature = 'v2board:cache';
2121

2222
/**
2323
* The console command description.
2424
*
2525
* @var string
2626
*/
27-
protected $description = '系统缓存任务';
27+
protected $description = '缓存任务';
2828

2929
/**
3030
* Create a new command instance.

app/Console/Kernel.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ class Kernel extends ConsoleKernel
2424
*/
2525
protected function schedule(Schedule $schedule)
2626
{
27+
// v2board
28+
$schedule->command('v2board:cache')->hourly();
2729
// check
2830
$schedule->command('check:order')->everyMinute();
2931
$schedule->command('check:expire')->everyMinute();
3032
$schedule->command('check:commission')->everyMinute();
31-
// system cache
32-
$schedule->command('system:cache')->hourly();
3333
// reset
3434
$schedule->command('reset:traffic')->monthlyOn(1, '00:00');
3535
$schedule->command('reset:serverLog')->monthlyOn(1, '00:00');

app/Http/Controllers/Passport/CommController.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public function sendEmailVerify (CommSendEmailVerify $request) {
3838
'mail.sendEmailVerify',
3939
[
4040
'code' => $code,
41-
'name' => config('v2board.app_name', 'V2Board')
41+
'name' => config('v2board.app_name', 'V2Board'),
42+
'url' => config('v2board.app_url')
4243
],
4344
function ($message) use($email, $subject) {
4445
$message->to($email)->subject($subject);

install.sql

+15-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ CREATE TABLE `v2_invite_code` (
1717
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1818

1919

20+
DROP TABLE IF EXISTS `v2_mail_log`;
21+
CREATE TABLE `v2_mail_log` (
22+
`id` int(11) NOT NULL AUTO_INCREMENT,
23+
`email` varchar(64) NOT NULL,
24+
`subject` varchar(255) NOT NULL,
25+
`template_name` varchar(255) NOT NULL,
26+
`error` varchar(255) DEFAULT NULL,
27+
`created_at` int(11) NOT NULL,
28+
`updated_at` int(11) NOT NULL,
29+
PRIMARY KEY (`id`)
30+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
31+
32+
2033
DROP TABLE IF EXISTS `v2_notice`;
2134
CREATE TABLE `v2_notice` (
2235
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -74,8 +87,8 @@ DROP TABLE IF EXISTS `v2_server`;
7487
CREATE TABLE `v2_server` (
7588
`id` int(11) NOT NULL AUTO_INCREMENT,
7689
`group_id` varchar(255) NOT NULL,
77-
`parent_id` int(11) DEFAULT NULL,
7890
`name` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
91+
`parent_id` int(11) DEFAULT NULL,
7992
`host` varchar(255) NOT NULL,
8093
`port` int(11) NOT NULL,
8194
`server_port` int(11) NOT NULL,
@@ -173,4 +186,4 @@ CREATE TABLE `v2_user` (
173186
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
174187

175188

176-
-- 2019-12-29 04:58:01
189+
-- 2019-12-30 11:13:16

resources/views/mail/sendEmailVerify.blade.php

+11
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@
5959
</tr>
6060

6161

62+
<tr>
63+
<td style="padding:0 0 27px;">
64+
<table cellpadding="0" cellspacing="0" align="center" style="margin:0 auto !important;">
65+
<tbody><tr>
66+
<td style="font:14px/16px Open Sans, Arial, Verdana, sans-serif; color:#fff; mso-padding-alt:12px 18px; border-radius:5px;" bgcolor="#05365d">
67+
<a target="_blank" style="text-decoration:none; color:#fff; display:block; padding:12px 18px;" href="{{$url}}">登录到{{$name}}</a>
68+
</td>
69+
</tr>
70+
</tbody></table>
71+
</td>
72+
</tr>
6273

6374

6475

resources/views/mail/sendRemindExpire.blade.php

+11
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@
5454
</tr>
5555

5656

57+
<tr>
58+
<td style="padding:0 0 27px;">
59+
<table cellpadding="0" cellspacing="0" align="center" style="margin:0 auto !important;">
60+
<tbody><tr>
61+
<td style="font:14px/16px Open Sans, Arial, Verdana, sans-serif; color:#fff; mso-padding-alt:12px 18px; border-radius:5px;" bgcolor="#05365d">
62+
<a target="_blank" style="text-decoration:none; color:#fff; display:block; padding:12px 18px;" href="{{$url}}">登录到{{$name}}</a>
63+
</td>
64+
</tr>
65+
</tbody></table>
66+
</td>
67+
</tr>
5768

5869

5970

resources/views/mail/sendRemindTraffic.blade.php

+11
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@
5454
</tr>
5555

5656

57+
<tr>
58+
<td style="padding:0 0 27px;">
59+
<table cellpadding="0" cellspacing="0" align="center" style="margin:0 auto !important;">
60+
<tbody><tr>
61+
<td style="font:14px/16px Open Sans, Arial, Verdana, sans-serif; color:#fff; mso-padding-alt:12px 18px; border-radius:5px;" bgcolor="#05365d">
62+
<a target="_blank" style="text-decoration:none; color:#fff; display:block; padding:12px 18px;" href="{{$url}}">登录到{{$name}}</a>
63+
</td>
64+
</tr>
65+
</tbody></table>
66+
</td>
67+
</tr>
5768

5869

5970

0 commit comments

Comments
 (0)