feat(user): 添加用户信息修改功能及对应验证码校验
- 在管理员页面新增修改用户信息表单,支持姓名、手机号、密码修改 - 实现验证码发送倒计时与发送状态管理 - 新增接口支持用户信息更新,包含密码和手机号校验 - 后端校验验证码有效性,编码密码后更新用户信息 - 修改用户信息后强制登出,确保安全性 - 优化登录状态判断,登出后跳转至登录页 - 取消部分日志打印,调整发送验证码缓存过期时间为5分钟
This commit is contained in:
@@ -20,6 +20,28 @@
|
||||
values (#{phone}, #{name}, #{password})
|
||||
</insert>
|
||||
|
||||
<update id="updatePassword">
|
||||
update user
|
||||
set password = #{password}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateUserInfo">
|
||||
update user
|
||||
<set>
|
||||
<if test="password != null">
|
||||
password = #{password},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name},
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
phone = #{phone},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectByPhone" resultMap="BaseResultMap">
|
||||
select *
|
||||
from user
|
||||
|
||||
Reference in New Issue
Block a user