更新密码

This commit is contained in:
panxuejie 2026-01-06 14:05:14 +08:00
parent f777182f96
commit e02f62caec
2 changed files with 1 additions and 2 deletions

View File

@ -26,5 +26,5 @@ CREATE INDEX idx_t_user_del_flag ON t_user(del_flag);
-- 插入默认管理员用户密码admin123
INSERT INTO t_user (username, password, nickname, email, phone, status, role, del_flag)
VALUES ('admin', '$2a$10$eT5Qe9C7J9P8X6H4L3K2J1I0H9G8F7E6D5C4B3A2Z1Y0X9W8V7U6T5', '管理员', 'admin@example.com', '13800138000', 1, 'admin', 0)
VALUES ('admin', 'oFcu0MX+JLxy+5RpiL3hhBhB2J4eCP7Ut9J7dJSMF9tT+Men', '管理员', 'admin@example.com', '13800138000', 1, 'admin', 0)
ON DUPLICATE KEY UPDATE nickname='管理员', email='admin@example.com', phone='13800138000', status=1, role='admin', del_flag=0;

View File

@ -76,7 +76,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
if (user == null) {
throw new RuntimeException("用户名或密码错误");
}
System.out.println(passwordEncoder.encode("admin123"));
// 验证密码
if (!passwordEncoder.matches(loginRequest.getPassword(), user.getPassword())) {
throw new RuntimeException("用户名或密码错误");