合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
``` public class Message{ private int code; private String statu; private Map<String, Object> data = new HashMap<String, Object>(); //成功 public static Message getSuccess() { Messageto message = new Message(); message.setCode(100); message.setStatu("成功"); return message ; } //失败 public static ToJson getFail() { Messageto message = new Message(); message .setCode(200); message .setStatu("失败"); return message ; } //钻石表达式 public Messageto putMap(String key, Object value) { this.getData().put(key, value); return this; } public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getStatu() { return statu; } public void setStatu(String statu) { this.statu = statu; } public Map<String, Object> getData() { return data; } public void setData(Map<String, Object> data) { this.data = data; } } ```