package com.usoft.credit.bl.util;


import com.usoft.credit.grpc.api.query.entity.ResponseHeader;

/**
 * 响应工具类
 */
public abstract class ResponseUtil {

	/**
	 * 获取自定义响应头
	 *
	 * @param code 返回码
	 * @param msg  返回消息
	 * @return
	 */
	public static ResponseHeader getResponseHeader(int code, String msg) {
		ResponseHeader.Builder builder = ResponseHeader.newBuilder();
		builder.setCode(code);
		builder.setMsg(msg);
		return builder.build();
	}

}
