package fi.er.webService;

import kd.bos.openapi.common.result.CustomApiResult;

/**
 * @author @author ww
 */
public class CustomApiResultForMy<T> extends CustomApiResult {


    public static <T> CustomApiResultForMy<T> success2(T data) {
        CustomApiResultForMy<T> result = new CustomApiResultForMy();
        result.setStatus(true);
        result.setData(data);
        return result;
    }

    public static <T> CustomApiResultForMy<T> fail(T data) {
        CustomApiResultForMy<T> result = new CustomApiResultForMy();
        result.setData(data);
        result.setStatus(false);
        result.setErrorCode("500");
        result.setMessage("失败");
        return result;
    }
}
