All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.net.wanmo.common.result.HttpResult Maven / Gradle / Ivy

The newest version!
package cn.net.wanmo.common.result;

import cn.net.wanmo.common.constant.HttpStatus;

public class HttpResult extends DefaultResult {


    @Override
    public Integer defaultSuccessCode() {
        return HttpStatus.SUCCESS;
    }

    @Override
    public String defaultSuccessMsg() {
        return "操作成功";
    }

    @Override
    public Integer defaultErrorCode() {
        return HttpStatus.ERROR;
    }

    @Override
    public String defaultErrorMsg() {
        return "操作失败";
    }

    @Override
    public boolean isSuccess() {
        int defaultSuccessCode = defaultSuccessCode();
        int code = getCode();

        return defaultSuccessCode == code;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy