package com.ruoyi.common.exception;


import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 业务逻辑异常 Exception
 */
@Data
@EqualsAndHashCode(callSuper = true)
public final class ServicePayException extends RuntimeException {

    /**
     * 业务错误码
     */
    private String code;
    /**
     * 错误提示
     */
    private String message;

    /**
     * 空构造方法，避免反序列化问题
     */
    public ServicePayException() {
    }


    public ServicePayException(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public ServicePayException setCode(String code) {
        this.code = code;
        return this;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public ServicePayException setMessage(String message) {
        this.message = message;
        return this;
    }

}
