首页>代码>spring+spring mvc+mybatis+mongodb+ActiveMQ+CXF整合小项目>/springmvc/src/main/java/com/manager/common/base/BaseResult.java
package com.manager.common.base;

/**
 * Created by static on 2017/3/31.
 * 返回封装类
 */
public class BaseResult {

    public static final int SUCCESS= 0;
    public static final int FAIL= 1;

    private int code;

    private String message;

    private Object value;

    public BaseResult() {}

    public BaseResult(int code,String message,Object value) {
        this.code = code;
        this.message = message;
        this.value = value;
    }

    public static BaseResult success(){
        return new BaseResult(BaseResult.SUCCESS,"SUCCESS",null);
    }

    public static BaseResult fail(){
        return new BaseResult(BaseResult.FAIL,"FAIL",null);
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }
}
最近下载更多
xsxtxbb  LV8 2021年3月10日
xop9622  LV8 2020年8月6日
simple丶余心  LV21 2020年7月23日
lwp011  LV27 2020年7月6日
wx112601  LV1 2020年3月12日
我考的骄傲  LV10 2020年2月10日
safari09  LV2 2020年1月7日
admin123456686  LV10 2019年12月11日
jyq123  LV1 2019年10月10日
53722426  LV7 2019年9月30日
最近浏览更多
1748938504  LV2 2023年6月30日
海棠花瘦  LV9 2023年6月12日
tonghao  LV18 2023年5月25日
liangge2115  LV27 2023年4月16日
代码太难了  LV11 2023年3月2日
安东尼online  LV11 2023年2月15日
1481917707  LV4 2023年1月1日
tuotuo12581 2022年12月16日
暂无贡献等级
微信网友_6263159342649344  LV7 2022年12月15日
lihz151 2022年12月5日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友