AccountLockedException.java 558 Bytes
package com.xly.erp.common.exception;

import com.xly.erp.common.response.ErrorCode;
import lombok.Getter;

/**
 * REQ-USR-004 账号被临时锁定时抛出。携带剩余 cooldownSeconds,
 * GlobalExceptionHandler 会把它转换成 ApiResponse.data 的 cooldownSeconds 字段。
 */
@Getter
public class AccountLockedException extends BizException {

    private final long cooldownSeconds;

    public AccountLockedException(long cooldownSeconds) {
        super(ErrorCode.LOGIN_ACCOUNT_LOCKED);
        this.cooldownSeconds = cooldownSeconds;
    }
}