首页>代码>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  LV15 2020年10月28日
yy1124218793  LV9 2020年8月2日
最近浏览更多
沈从文  LV2 2023年12月31日
768881787  LV7 2023年12月25日
yolo_light  LV1 2023年12月20日
wwwww816  LV3 2023年12月19日
mds123456  LV2 2023年11月3日
暂无贡献等级
好我累个去哦  LV15 2023年8月5日
1748938504  LV2 2023年6月30日
gecongkai  LV8 2023年6月23日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友