mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 22:57:17 +08:00 
			
		
		
		
	fix: 修复个人中心密码设置状态显示错误的问题
This commit is contained in:
		| @@ -78,10 +78,10 @@ public class UserCenterController { | ||||
|     public R updatePassword(@Validated @RequestBody UpdatePasswordRequest updatePasswordRequest) { | ||||
|         String rawOldPassword = | ||||
|             ExceptionUtils.exToNull(() -> SecureUtils.decryptByRsaPrivateKey(updatePasswordRequest.getOldPassword())); | ||||
|         ValidationUtils.throwIfBlank(rawOldPassword, "当前密码解密失败"); | ||||
|         ValidationUtils.throwIfNull(rawOldPassword, "当前密码解密失败"); | ||||
|         String rawNewPassword = | ||||
|             ExceptionUtils.exToNull(() -> SecureUtils.decryptByRsaPrivateKey(updatePasswordRequest.getNewPassword())); | ||||
|         ValidationUtils.throwIfBlank(rawNewPassword, "新密码解密失败"); | ||||
|         ValidationUtils.throwIfNull(rawNewPassword, "新密码解密失败"); | ||||
|         ValidationUtils.throwIf(!ReUtil.isMatch(RegexConsts.PASSWORD, rawNewPassword), | ||||
|             "密码长度为 6 到 32 位,可以包含字母、数字、下划线,特殊字符,同时包含字母和数字"); | ||||
|         userService.updatePassword(rawOldPassword, rawNewPassword, LoginHelper.getUserId()); | ||||
|   | ||||
| @@ -61,8 +61,8 @@ VALUES | ||||
| INSERT IGNORE INTO `sys_user` | ||||
| (`id`, `username`, `nickname`, `password`, `gender`, `email`, `phone`, `avatar`, `description`, `status`, `is_system`, `pwd_reset_time`, `dept_id`, `create_user`, `create_time`, `update_user`, `update_time`) | ||||
| VALUES | ||||
| (1, 'admin', '超级管理员', '9802815bcc5baae7feb1ae0d0566baf2', 1, 'charles7c@126.com', '18888888888', NULL, '系统初始用户', 1, b'1', NULL, 1, 1, NOW(), NULL, NULL), | ||||
| (2, 'test', '测试员', '8e114197e1b33783a00542ad67e80516', 2, NULL, NULL, NULL, NULL, 2, b'0', NULL, 5, 1, NOW(), NULL, NULL); | ||||
| (1, 'admin', '超级管理员', '9802815bcc5baae7feb1ae0d0566baf2', 1, 'charles7c@126.com', '18888888888', NULL, '系统初始用户', 1, b'1', NOW(), 1, 1, NOW(), NULL, NULL), | ||||
| (2, 'test', '测试员', '8e114197e1b33783a00542ad67e80516', 2, NULL, NULL, NULL, NULL, 2, b'0', NOW(), 5, 1, NOW(), NULL, NULL); | ||||
|  | ||||
| -- 初始化默认角色和菜单关联数据 | ||||
| INSERT IGNORE INTO `sys_role_menu` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user