首页>代码>ssm实现涉税申请管理系统(简单的审批流)>/新建文件夹/taxsqgl/src/main/java/bas/request/RestRequest.java
package bas.request;


import javax.validation.Valid;
import java.io.Serializable;

/**
 * 请求参数形式
 *
 * @time: 2018年04月16日
 * @author: wentao
 * @copyright: Wuxi Yazuo ,Ltd.copyright 2015-2025
 */


public class RestRequest<T> implements Serializable {
    private static final long serialVersionUID = -1296515585582912062L;
    private RestRequestHeader header = new RestRequestHeader();
    @Valid
    private T body = null;

    public RestRequest() {
    }

    public RestRequest(T body) {
        this.body = body;
    }

    public static <T> RestRequest<T> instance(T body) {
        return new RestRequest(body);
    }

    public RestRequestHeader getHeader() {
        return this.header;
    }

    public T getBody() {
        return this.body;
    }

    public void setHeader(RestRequestHeader header) {
        this.header = header;
    }

    public void setBody(T body) {
        this.body = body;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof RestRequest)) {
            return false;
        } else {
            RestRequest<?> other = (RestRequest)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$header = this.getHeader();
                Object other$header = other.getHeader();
                if (this$header == null) {
                    if (other$header != null) {
                        return false;
                    }
                } else if (!this$header.equals(other$header)) {
                    return false;
                }

                Object this$body = this.getBody();
                Object other$body = other.getBody();
                if (this$body == null) {
                    if (other$body != null) {
                        return false;
                    }
                } else if (!this$body.equals(other$body)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof RestRequest;
    }

    @Override
    public int hashCode() {
        int PRIME = 31;
        int result = 1;
        Object $header = this.getHeader();
         result = result * 59 + ($header == null ? 43 : $header.hashCode());
        Object $body = this.getBody();
        result = result * 59 + ($body == null ? 43 : $body.hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "RestRequest(header=" + this.getHeader() + ", body=" + this.getBody() + ")";
    }
}

最近下载更多
smrhmjh  LV1 4月9日
人间蒸发  LV23 4月1日
xdzxwje  LV1 2023年12月3日
微信网友_6469820124057600  LV6 2023年5月30日
79134582  LV2 2023年3月19日
1443251642  LV1 2022年12月19日
taowufeng2  LV8 2022年12月12日
13112360  LV2 2022年9月26日
woaiyuan3619  LV3 2022年9月26日
wangjialiang1  LV17 2022年6月6日
最近浏览更多
a18687266730 4月18日
暂无贡献等级
denglu123321  LV4 4月11日
smrhmjh  LV1 4月9日
人间蒸发  LV23 4月1日
暂无贡献等级
1waxzsq212345  LV2 2023年12月5日
xdzxwje  LV1 2023年12月3日
shuangfu  LV24 2023年12月2日
haitianjiaoyu0  LV6 2023年11月21日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友