Add account register and verify api
This commit is contained in:
@@ -5,7 +5,7 @@ create table if not exists t_user
|
||||
id bigint not null primary key,
|
||||
username varchar(20) not null comment '用户名',
|
||||
password char(70) not null comment '密码',
|
||||
verify varchar(36) null comment '验证信息',
|
||||
verify varchar(50) null comment '验证信息',
|
||||
locking int not null comment '锁定',
|
||||
expiration datetime comment '过期时间',
|
||||
credentials_expiration datetime comment '认证过期时间',
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<select id="selectListWithRoleInfoByIds" resultMap="userWithRoleInfoMap">
|
||||
select t_user.id as user_id,
|
||||
t_user.username as user_username,
|
||||
t_user.password as user_password,
|
||||
t_user.verify as user_verify,
|
||||
t_user.locking as user_locking,
|
||||
t_user.expiration as user_expiration,
|
||||
t_user.credentials_expiration as user_credentials_expiration,
|
||||
@@ -177,7 +177,7 @@
|
||||
<select id="selectOneWithRoleInfoById" resultMap="userWithRoleInfoMap">
|
||||
select t_user.id as user_id,
|
||||
t_user.username as user_username,
|
||||
t_user.password as user_password,
|
||||
t_user.verify as user_verify,
|
||||
t_user.locking as user_locking,
|
||||
t_user.expiration as user_expiration,
|
||||
t_user.credentials_expiration as user_credentials_expiration,
|
||||
@@ -224,7 +224,7 @@
|
||||
<select id="selectListWithInfo" resultMap="userWithInfoMap">
|
||||
select t_user.id as user_id,
|
||||
t_user.username as user_username,
|
||||
t_user.password as user_password,
|
||||
t_user.verify as user_verify,
|
||||
t_user.locking as user_locking,
|
||||
t_user.expiration as user_expiration,
|
||||
t_user.credentials_expiration as user_credentials_expiration,
|
||||
@@ -282,6 +282,7 @@
|
||||
<resultMap id="userBaseMap" type="user">
|
||||
<id property="id" column="user_id"/>
|
||||
<result property="username" column="user_username"/>
|
||||
<result property="verify" column="user_verify"/>
|
||||
<result property="locking" column="user_locking"/>
|
||||
<result property="expiration" column="user_expiration"/>
|
||||
<result property="credentialsExpiration" column="user_credentials_expiration"/>
|
||||
|
||||
85
src/main/resources/templates/email-verify-account-cn.vm
Normal file
85
src/main/resources/templates/email-verify-account-cn.vm
Normal file
@@ -0,0 +1,85 @@
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>激活您的账号</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #4D4D4D;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #4E47BB;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
background-color: #F1F2F7;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.view {
|
||||
display: flex;
|
||||
width: 800px;
|
||||
max-width: 100vw;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.card {
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
border-radius: 12px;
|
||||
flex: 1;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
font-weight: bolder;
|
||||
font-size: 1.6em;
|
||||
color: #4E47BB;
|
||||
}
|
||||
|
||||
.verify-button {
|
||||
display: flex;
|
||||
margin: 20px;
|
||||
padding-bottom: 60px;
|
||||
justify-content: center;
|
||||
|
||||
}
|
||||
.verify-button a {
|
||||
padding: 20px 30px;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
font-size: 1.2em;
|
||||
background-color: #4E47BB;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.not-reply {
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="view">
|
||||
<div class="card">
|
||||
<div class="title">账 号 激 活</div>
|
||||
<div><strong>${username}</strong>,您好:</div>
|
||||
<div style="text-indent: 2em">感谢注册 <a target="_blank" href=${appUrl}>${appName}(${appUrl})</a>,在继续使用之前,我们需要确定您的电子邮箱地址的有效性,请在 <u><i>两小时内</i></u> 点击下面的按钮帮助我们验证:</div>
|
||||
<div class="verify-button"><a target="_blank" href=${verifyUrl}>验证邮箱</a></div>
|
||||
<div>如果以上按钮无法点击,请复制此链接到浏览器地址栏中访问:<a target="_blank" href=${verifyUrl}>${verifyUrl}</a></div>
|
||||
<div class="not-reply">此邮件由系统自动发送,请勿回复!</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user