feat(user): 添加用户修改密码功能
- 在前端 HomePage 组件中添加修改密码对话框 - 在 API 中添加 updatePassword 接口 - 在后端 UserController 中添加密码更新接口 - 在 UserService 中添加 updatePassword 方法 - 实现密码更新逻辑,包括旧密码验证和新密码加密
This commit is contained in:
@@ -3,6 +3,8 @@ package com.test.bijihoudaun.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.test.bijihoudaun.entity.User;
|
||||
|
||||
import com.test.bijihoudaun.bo.UpdatePasswordBo;
|
||||
|
||||
public interface UserService extends IService<User> {
|
||||
/**
|
||||
* 用户注册
|
||||
@@ -33,4 +35,11 @@ public interface UserService extends IService<User> {
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean isTokenExpired(Long id,String token);
|
||||
|
||||
/**
|
||||
* 更新用户密码
|
||||
* @param userId 用户ID
|
||||
* @param updatePasswordBo 包含新旧密码的对象
|
||||
*/
|
||||
void updatePassword(Long userId, UpdatePasswordBo updatePasswordBo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user