diff --git a/src/main/java/io/walkers/planes/fundhelper/entity/dict/MessageDict.java b/src/main/java/io/walkers/planes/fundhelper/entity/dict/MessageDict.java index eb37001..76a2436 100644 --- a/src/main/java/io/walkers/planes/fundhelper/entity/dict/MessageDict.java +++ b/src/main/java/io/walkers/planes/fundhelper/entity/dict/MessageDict.java @@ -7,6 +7,7 @@ */ public interface MessageDict { + String SUCCESS = "成功"; String SYSTEM_ERROR = "系统异常,请联系管理员"; String PARAMETER_VALIDATOR_FAILED = "参数校验失败:"; String FUND_TYPE_NOT_SUPPORT = "基金类型 {%s} 不支持, 请检查基金代码是否正确"; diff --git a/src/main/java/io/walkers/planes/fundhelper/entity/pojo/Response.java b/src/main/java/io/walkers/planes/fundhelper/entity/pojo/Response.java index 08df8bb..736ba2c 100644 --- a/src/main/java/io/walkers/planes/fundhelper/entity/pojo/Response.java +++ b/src/main/java/io/walkers/planes/fundhelper/entity/pojo/Response.java @@ -1,5 +1,6 @@ package io.walkers.planes.fundhelper.entity.pojo; +import io.walkers.planes.fundhelper.entity.dict.MessageDict; import io.walkers.planes.fundhelper.util.JacksonUtil; import lombok.Data; @@ -10,7 +11,6 @@ */ @Data public class Response { - private static final String SUCCESS = "Success"; /** * 返回结果是否成功 */ @@ -27,14 +27,14 @@ public class Response { public static Response success() { Response res = new Response<>(); res.setSuccess(true); - res.setMessage(SUCCESS); + res.setMessage(MessageDict.SUCCESS); return res; } public static Response success(T data) { Response res = new Response(); res.setSuccess(true); - res.setMessage(SUCCESS); + res.setMessage(MessageDict.SUCCESS); res.setData(data); return res; }