From 3e73778bdaf84c8398e0b8bdb1bc339b3160ff78 Mon Sep 17 00:00:00 2001 From: chenjiahe <763432473@qq.com> Date: 星期三, 15 十二月 2021 14:55:41 +0800 Subject: [PATCH] 新增子状态 --- src/main/java/com/platform/resultTool/PlatformResult.java | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/platform/resultTool/PlatformResult.java b/src/main/java/com/platform/resultTool/PlatformResult.java index fb02e72..956608d 100644 --- a/src/main/java/com/platform/resultTool/PlatformResult.java +++ b/src/main/java/com/platform/resultTool/PlatformResult.java @@ -11,7 +11,10 @@ private static final long serialVersionUID = -3948389268046368059L; + /**鎬荤紪鐮�*/ private String code; + /**瀛愮紪鐮�*/ + private String subCode = "100"; private String msg; @@ -54,11 +57,28 @@ return Result; } + public static PlatformResult failure(String code,String subCode, String msg) { + PlatformResult Result = new PlatformResult(); + Result.setCode(code); + Result.setMsg(msg); + Result.setSubCode(subCode); + return Result; + } + public static PlatformResult failure(String code, String msg, Object data) { PlatformResult Result = new PlatformResult(); Result.setCode(code); Result.setMsg(msg); Result.setData(data); + return Result; + } + + public static PlatformResult failure(String code,String subCode, String msg, Object data) { + PlatformResult Result = new PlatformResult(); + Result.setCode(code); + Result.setMsg(msg); + Result.setData(data); + Result.setSubCode(subCode); return Result; } @@ -88,5 +108,12 @@ this.data = data; } + public String getSubCode() { + return subCode; + } + + public void setSubCode(String subCode) { + this.subCode = subCode; + } } -- Gitblit v1.8.0