Commit 3dbbc6a2 authored by RuoYi's avatar RuoYi

AjaxResult重写put方法,以方便链式调用

parent d3696f52
...@@ -146,15 +146,17 @@ public class AjaxResult extends HashMap<String, Object> ...@@ -146,15 +146,17 @@ public class AjaxResult extends HashMap<String, Object>
return new AjaxResult(code, msg, null); return new AjaxResult(code, msg, null);
} }
/** /**
* 链式调用 * 方便链式调用
* *
* @param key 键 * @param key 键
* @param value 内容 * @param value 值
* @return 警告消息 * @return 数据对象
*/ */
public AjaxResult put(String key, Object value) { @Override
super.put(key, value); public AjaxResult put(String key, Object value)
return this; {
} super.put(key, value);
return this;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment