diff --git a/plusone-system/plusone-system-domain/src/main/java/xyz/zhouxy/plusone/system/domain/model/account/Password.java b/plusone-system/plusone-system-domain/src/main/java/xyz/zhouxy/plusone/system/domain/model/account/Password.java index d810c58..1e84525 100644 --- a/plusone-system/plusone-system-domain/src/main/java/xyz/zhouxy/plusone/system/domain/model/account/Password.java +++ b/plusone-system/plusone-system-domain/src/main/java/xyz/zhouxy/plusone/system/domain/model/account/Password.java @@ -8,9 +8,8 @@ import javax.annotation.Nonnull; import org.springframework.util.Assert; import xyz.zhouxy.plusone.commons.constant.PatternConsts; -import xyz.zhouxy.plusone.constant.ErrorCodeConsts; import xyz.zhouxy.plusone.domain.IValueObject; -import xyz.zhouxy.plusone.exception.BizException; +import xyz.zhouxy.plusone.exception.SysException; import xyz.zhouxy.plusone.system.util.PasswordUtil; /** @@ -37,7 +36,7 @@ public class Password implements IValueObject { } var salt = PasswordUtil.generateRandomSalt(); if (salt == null) { - throw new BizException(ErrorCodeConsts.DEFAULT_ERROR_CODE, "未知错误:生成随机盐失败"); + throw new SysException("未知错误:生成随机盐失败"); } this.saltVal = salt; this.passwordVal = PasswordUtil.hashPassword(password, salt);