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

pro.chenggang.plugin.springcloud.gateway.option.ResponseResult Maven / Gradle / Ivy

There is a newer version: 2.1.SR2.2.RELEASE
Show newest version
package pro.chenggang.plugin.springcloud.gateway.option;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * ResponseResult
 * @author chenggang
 * @date 2019/01/29
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
public class ResponseResult {

    @JSONField(ordinal = 1)
    private String code;
    @JSONField(ordinal = 2)
    private String msg;
    @JSONField(ordinal = 3)
    private T data;

    public ResponseResult(ResponseInfo responseInfo) {
        this.code = responseInfo.getCode();
        this.msg = responseInfo.getMsg();
    }

    public ResponseResult(ResponseInfo responseInfo,T data) {
        this.code = responseInfo.getCode();
        this.msg = responseInfo.getMsg();
        this.data = data;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy