优化暂未配置存储提供商提示

pull/65/head
awenes 2023-10-06 20:00:21 +08:00
parent cb0104eb22
commit e229b1a723
3 changed files with 8 additions and 7 deletions

View File

@ -39,11 +39,11 @@ public class NoneStorage extends AbstractStorage {
@Override
public String upload(@NotNull String fileName,
InputStream inputStream) throws StorageProviderException {
throw new StorageProviderException("暂未配置存储提供商,请联系管理员");
throw new StorageProviderException("暂未配置存储提供商");
}
@Override
public String download(String path) throws StorageProviderException {
throw new StorageProviderException("暂未配置存储提供商,请联系管理员");
throw new StorageProviderException("暂未配置存储提供商");
}
}

View File

@ -98,8 +98,9 @@ public class UserProfileServiceImpl implements UserProfileService {
//获取用户
AdministratorEntity administrator = getCurrentUser();
//校验旧密码
if (!passwordEncoder.matches(param.getOldPassword(),administrator.getPassword())){
logger.error("用户ID: [{}] 用户名: [{}] 修改密码失败,原密码错误",administrator.getId(),administrator.getUsername());
if (!passwordEncoder.matches(param.getOldPassword(), administrator.getPassword())) {
logger.error("用户ID: [{}] 用户名: [{}] 修改密码失败,原密码错误", administrator.getId(),
administrator.getUsername());
throw new PasswordValidatedFailException("旧密码错误");
}
//修改密码