package com.njcn.gateway.utils;

import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.gateway.enums.GateWayEnum;

/**
 * @author hongawen
 * @version 1.0.0
 * @date 2021年06月04日 11:22
 */
public class GatePubUtils {

    /**
     * 通用结果集
     */
    public static <T> HttpResult<T> assembleGateWayResponseResult(GateWayEnum responseEnum, T result, String methodDescribe) {
        return HttpResultUtil.assembleResult(responseEnum.getCode(), result, methodDescribe + responseEnum.getMessage());
    }
}
