AjaxResult重写put方法,以方便链式调用
This commit is contained in:
parent
0023c2a5c3
commit
3eac5e93f8
|
|
@ -179,4 +179,17 @@ public class AjaxResult extends HashMap<String, Object>
|
||||||
{
|
{
|
||||||
return new AjaxResult(Type.ERROR, msg, data);
|
return new AjaxResult(Type.ERROR, msg, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方便链式调用
|
||||||
|
*
|
||||||
|
* @param key
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult put(String key, Object value) {
|
||||||
|
super.put(key, value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue