devicd_no
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m58s
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m58s
This commit is contained in:
parent
dcdbabdb13
commit
4b528184ea
@ -551,5 +551,37 @@ CREATE TABLE IF NOT EXISTS `server_rule_group`
|
|||||||
DEFAULT CHARSET = utf8mb4
|
DEFAULT CHARSET = utf8mb4
|
||||||
COLLATE = utf8mb4_general_ci;
|
COLLATE = utf8mb4_general_ci;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `user_family`
|
||||||
|
(
|
||||||
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||||
|
`owner_user_id` bigint NOT NULL COMMENT 'Owner User ID',
|
||||||
|
`max_members` int NOT NULL DEFAULT 5 COMMENT 'Max members in family',
|
||||||
|
`status` tinyint NOT NULL DEFAULT 1 COMMENT 'Status: 1=active, 0=disabled',
|
||||||
|
`created_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
`updated_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
|
||||||
|
`deleted_at` datetime(3) NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
UNIQUE INDEX `uniq_owner_user_id`(`owner_user_id` ASC) USING BTREE,
|
||||||
|
INDEX `idx_status`(`status` ASC) USING BTREE,
|
||||||
|
INDEX `idx_deleted_at`(`deleted_at` ASC) USING BTREE
|
||||||
|
) ENGINE = InnoDB AUTO_INCREMENT = 485 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `user_family_member` (
|
||||||
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||||
|
`family_id` bigint NOT NULL COMMENT 'Family ID',
|
||||||
|
`user_id` bigint NOT NULL COMMENT 'Member User ID',
|
||||||
|
`role` tinyint NOT NULL DEFAULT 2 COMMENT 'Role: 1=owner, 2=member',
|
||||||
|
`status` tinyint NOT NULL DEFAULT 1 COMMENT 'Status: 1=active, 2=left, 3=removed',
|
||||||
|
`join_source` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'Join source',
|
||||||
|
`joined_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
`left_at` datetime(3) NULL DEFAULT NULL,
|
||||||
|
`created_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
`updated_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
|
||||||
|
`deleted_at` datetime(3) NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
UNIQUE INDEX `uniq_user_id`(`user_id` ASC) USING BTREE,
|
||||||
|
INDEX `idx_family_status`(`family_id` ASC, `status` ASC) USING BTREE,
|
||||||
|
INDEX `idx_deleted_at`(`deleted_at` ASC) USING BTREE
|
||||||
|
) ENGINE = InnoDB AUTO_INCREMENT = 510 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
|||||||
@ -301,41 +301,83 @@ const (
|
|||||||
</body>
|
</body>
|
||||||
</html>`
|
</html>`
|
||||||
|
|
||||||
DefaultDeleteAccountEmailTemplate = `<!doctype html>
|
DefaultDeleteAccountEmailTemplate = `<!DOCTYPE html>
|
||||||
<html lang="zh-CN">
|
<html lang="zh-CN">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<style>
|
</head>
|
||||||
body { margin: 0; padding: 0; background: #f4f4f4; font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif; }
|
<body style="margin:0; padding:0; background-color:#f4f4f4; font-family:'PingFang SC','Microsoft YaHei',Arial,sans-serif;">
|
||||||
.container { max-width: 600px; margin: 0 auto; background: #fff; padding: 40px; }
|
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#f4f4f4">
|
||||||
.logo { text-align: right; margin-bottom: 40px; }
|
<tr>
|
||||||
.title { font-size: 28px; font-weight: 600; color: #0F2C53; margin-bottom: 16px; }
|
<td align="center">
|
||||||
.content { font-size: 16px; color: #0F2C53; line-height: 1.6; }
|
<table width="600" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff" style="min-height:740px; padding-bottom:53px;">
|
||||||
.warning-box { background: #FFF3CD; border-left: 4px solid #FF8C00; padding: 16px 20px; margin: 24px 0; border-radius: 4px; }
|
|
||||||
.warning-box p { margin: 0; font-size: 15px; color: #5C3D00; }
|
<!-- Top Logo -->
|
||||||
.footer { margin-top: 40px; font-size: 12px; color: #999; text-align: center; }
|
<tr>
|
||||||
</style>
|
<td align="right" style="padding:32px 40px 0 0;">
|
||||||
</head>
|
{{if .SiteLogo}}<img height="47" style="display:block;" src="{{.SiteLogo}}" alt="{{.SiteName}}">{{end}}
|
||||||
<body>
|
</td>
|
||||||
<div class="container">
|
</tr>
|
||||||
<div class="logo">
|
|
||||||
{{if .SiteLogo}}<img src="{{.SiteLogo}}" alt="{{.SiteName}}" height="47" style="display:block;" />{{end}}
|
<!-- Spacer -->
|
||||||
</div>
|
<tr><td height="70"></td></tr>
|
||||||
<div class="title">账户注销确认</div>
|
|
||||||
<div class="content">
|
<!-- Main Content -->
|
||||||
<p>您好,</p>
|
<tr>
|
||||||
<p>我们收到了您注销 <strong>{{.SiteName}}</strong> 账户的请求。请在系统提示时输入以下验证码以完成注销:</p>
|
<td style="padding:0 43px 0 43px;">
|
||||||
<div style="font-size: 48px; font-weight: 700; color: #0F2C53; letter-spacing: 4px; margin: 24px 0;">{{.Code}}</div>
|
<h1 style="font-weight:600; font-size:36px; line-height:1.4; color:#0F2C53; margin:0 0 24px 0;">
|
||||||
<p>验证码将在 <strong>{{.Expire}} 分钟</strong>后过期。</p>
|
账户注销确认
|
||||||
<div class="warning-box">
|
</h1>
|
||||||
<p>⚠️ <strong>重要提示:</strong>账户注销后,您的所有数据(包括订阅、套餐、账户信息)将被<strong>永久删除且不可恢复</strong>。请确认您已充分了解此操作的后果。</p>
|
<p style="font-weight:400; font-size:16px; line-height:1.4; color:#0F2C53; margin:0 0 24px 0; white-space:pre-line;">
|
||||||
</div>
|
亲爱的用户,
|
||||||
<p>如果这不是您本人的操作,请立即忽略本邮件,您的账户将保持安全。</p>
|
|
||||||
<p>谢谢,<br />{{.SiteName}} 团队</p>
|
我们收到了你注销 {{.SiteName}} 账户的请求。
|
||||||
</div>
|
请在系统提示时输入以下验证码以完成注销:
|
||||||
<div class="footer">此为系统邮件,请勿回复</div>
|
</p>
|
||||||
</div>
|
|
||||||
</body>
|
<div style="font-weight:600; font-size:48px; line-height:1.4; color:#0F2C53; margin:24px 0; letter-spacing:2px;">
|
||||||
|
{{.Code}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="font-weight:400; font-size:16px; line-height:1.4; color:#0F2C53; margin:24px 0 0 0;">
|
||||||
|
该验证码将在 {{.Expire}} 分钟 后过期。
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!-- Warning Box -->
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin:24px 0;">
|
||||||
|
<tr>
|
||||||
|
<td style="background:#FFF3CD; border-left:4px solid #FF8C00; padding:16px 20px; border-radius:4px;">
|
||||||
|
<p style="margin:0; font-size:15px; color:#5C3D00; line-height:1.6;">
|
||||||
|
⚠️ <strong>重要提示:</strong>账户注销后,你的所有数据(包括订阅、套餐、账户信息)将被<strong>永久删除且不可恢复</strong>。请确认你已充分了解此操作的后果。
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p style="font-weight:400; font-size:16px; line-height:1.4; color:#0F2C53; margin:24px 0 0 0; white-space:pre-line;">
|
||||||
|
如果这不是你本人操作,请忽略本邮件,你的账户将保持安全。
|
||||||
|
|
||||||
|
谢谢,
|
||||||
|
{{.SiteName}}团队
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- Spacer -->
|
||||||
|
<tr><td height="50"></td></tr>
|
||||||
|
|
||||||
|
<!-- Footer Logo -->
|
||||||
|
<tr>
|
||||||
|
<td align="center" style="padding-bottom:20px;">
|
||||||
|
{{if .SiteLogo}}<img width="52" height="52" style="display:block; margin:0 auto;" src="{{.SiteLogo}}" alt="{{.SiteName}}">{{end}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
</html>`
|
</html>`
|
||||||
)
|
)
|
||||||
|
|||||||
12
说明文档.md
12
说明文档.md
@ -20,8 +20,14 @@ certbot certonly --manual --preferred-challenges dns -d airoport.win -d "*.airop
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
gunzip -c /Users/Apple/Downloads/db_backups_20260315_000003/mysql/mysql_dump_20260311_173933.sql.gz \
|
gunzip -c mysql_dump_20260317_145137.sql.gz \
|
||||||
| docker exec -i ppanel-db mysql -uroot -prootpassword
|
| docker exec -i ppanel-mysql mysql -uroot -pjpcV41ppanel
|
||||||
|
|
||||||
|
|
||||||
go run scripts/migrate_paid_users.go -src 'root:rootpassword@tcp(127.0.0.1:3306)/ppanel?charset=utf8mb4&parseTime=True&loc=Local' -dst 'root:jpcV41ppanel@tcp(154.12.35.103:3306)/ppanel?charset=utf8mb4&parseTime=True&loc=Local' -clean
|
go run scripts/migrate_paid_users.go -src 'root:rootpassword@tcp(127.0.0.1:3306)/ppanel?charset=utf8mb4&parseTime=True&loc=Local' -dst 'root:jpcV41ppanel@tcp(154.12.35.103:3306)/ppanel?charset=utf8mb4&parseTime=True&loc=Local' -clean
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
docker exec ppanel-redis redis-cli --scan --pattern "*" \
|
||||||
|
grep -vE "^auth:session_id:|^auth:user_sessions:" \
|
||||||
|
xargs -r -n 500 docker exec -i ppanel-redis redis-cli DEL
|
||||||
Loading…
x
Reference in New Issue
Block a user