package com.engine.htxc.tycgsqehy.common;




import com.alibaba.fastjson.JSONObject;
import com.engine.htxc.tycgsqehy.entity.TycgsqEntity;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * @Title: ecology-9
 * @Company: 泛微软件
 * @author: K1810027
 * @version: 1.0
 * @CreateDate: 2022-09-14 15:19
 * @Description:
 * @ModifyLog:
 **/
public class CommonResult<T>  {
    private T data;
    private String msg;
    private String code;

    public T getT() {
        return data;
    }

    public void setT(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

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

    public CommonResult(T data) {
        this.data = data;
    }
    public CommonResult<T> ok(){
        this.data = data;
        this.code="200";
        this.msg="SUUCESS";
        return this;
    }
    public CommonResult<T> error(){
        this.data = data;
        this.code="400";
        this.msg="ERROR";
        return this;
    }



}
