Browse Source

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

tags/v2.3.0
RuoYi 4 years ago
parent
commit
594329127f
  1. 14
      ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java

14
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java

@ -57,6 +57,20 @@ public class AjaxResult extends HashMap<String, Object> @@ -57,6 +57,20 @@ public class AjaxResult extends HashMap<String, Object>
super.put(DATA_TAG, data);
}
}
/**
* 方便链式调用
*
* @param key
* @param value
* @return
*/
@Override
public AjaxResult put(String key, Object value)
{
super.put(key, value);
return this;
}
/**
* 返回成功消息

Loading…
Cancel
Save