首页>代码>maven+spring+spring mvc+mybatis整合实现ssm通用增删改查基础开发框架>/demo-ssm/src/main/java/com/xe/demo/common/pojo/AjaxResult.java
package com.xe.demo.common.pojo;

/**
 * 封装返回数据
 * @author czh
 * @2015年5月20日
 */
public class AjaxResult {

	private int retcode = 1;
	private String retmsg = "操作成功";
	private Object data;
	
	public AjaxResult(int retcode, String retmsg, Object data){
		this.retcode = retcode;
		this.retmsg = retmsg;
		this.data = data;
	}
	
	public AjaxResult(int retcode, String retmsg){
		this.retcode = retcode;
		this.retmsg = retmsg;
	}
	
	public AjaxResult(Object data){
		this.retmsg = "查询成功";
		this.data = data;
	}
	
	public AjaxResult(int retcode){
		this.retcode = retcode;
		this.retmsg = "操作失败";
	}
	
	public AjaxResult(String retmsg){
		this.retcode = 0;
		this.retmsg = retmsg;
	}
	
	public AjaxResult(){
		
	}

	public int getRetcode() {
		return retcode;
	}
	public void setRetcode(int retcode) {
		this.retcode = retcode;
	}
	public String getRetmsg() {
		return retmsg;
	}
	public void setRetmsg(String retmsg) {
		this.retmsg = retmsg;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}

	@Override
	public String toString() {
		return "AjaxResult [retcode=" + retcode + ", retmsg=" + retmsg + ", data=" + data + "]";
	}
	
}
最近下载更多
好我累个去哦  LV15 2023年8月5日
微信网友_6263159342649344  LV7 2022年12月16日
李亮  LV19 2021年11月16日
木易雨山  LV7 2021年7月15日
17587079094  LV6 2021年6月21日
小蜜蜂123  LV9 2020年12月19日
coooder  LV3 2020年12月16日
王东东  LV17 2020年10月28日
yangtongyong  LV16 2020年10月28日
yy1124218793  LV9 2020年8月2日
最近浏览更多
暂无贡献等级
taoshen95  LV16 4月6日
2421796355  LV1 2024年12月10日
微信网友_7265127836766208 2024年11月22日
暂无贡献等级
气之子dss  LV4 2024年6月24日
965718  LV1 2024年6月21日
lxzlxzl  LV1 2024年6月21日
szqqqaaqqa  LV1 2024年6月20日
2032867896  LV1 2024年6月20日
xzg123456  LV6 2024年6月19日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友