From 788c8dc575c8104f84c028f719675842b272a736 Mon Sep 17 00:00:00 2001 From: llnancy Date: Tue, 15 Oct 2024 21:32:36 +0800 Subject: [PATCH] feat: add default code --- .../llnancy/mojian/base/exception/MoJianBaseBizException.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mojian-base/src/main/java/io/github/llnancy/mojian/base/exception/MoJianBaseBizException.java b/mojian-base/src/main/java/io/github/llnancy/mojian/base/exception/MoJianBaseBizException.java index deb6b60..7f85073 100644 --- a/mojian-base/src/main/java/io/github/llnancy/mojian/base/exception/MoJianBaseBizException.java +++ b/mojian-base/src/main/java/io/github/llnancy/mojian/base/exception/MoJianBaseBizException.java @@ -1,6 +1,7 @@ package io.github.llnancy.mojian.base.exception; import io.github.llnancy.mojian.base.entity.response.Response; +import io.github.llnancy.mojian.base.enums.ResponseEnum; import lombok.Getter; import java.io.Serial; @@ -20,7 +21,7 @@ public class MoJianBaseBizException extends RuntimeException { /** * 异常码 */ - private Integer code; + private Integer code = ResponseEnum.FAILURE.getCode(); /** * use String.format()