青羊经侦大队-数据平台
baizonghao
2023-05-22 aa8836a65e97e297340fff3a42615f0a36f314e7
src/main/java/com/example/jz/exception/BusinessException.java
@@ -3,18 +3,14 @@
import com.example.jz.enums.BusinessHttpStatus;
import org.springframework.http.HttpStatus;
public class BusinessException extends RuntimeException{
public class BusinessException extends RuntimeException {
    /**
     *
     */
    private static final long serialVersionUID = -4137688758944857209L;
    /**
     * http状态码
     */
    private Integer httpStatusCode;
    /**
     * @param httpStatus http状态码
@@ -32,15 +28,12 @@
        this.httpStatusCode = httpStatus.value();
    }
    public BusinessException(String msg) {
        super(msg);
        this.httpStatusCode = HttpStatus.BAD_REQUEST.value();
        this.httpStatusCode = BusinessHttpStatus.BAD_EXCEPTION.value();
    }
    public Integer getHttpStatusCode() {
        return httpStatusCode;
    }
}
}