InterfaceAddrConstant.java 836 Bytes
Newer Older
苗卫卫 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
package com.boco.nbd.wios.manage.contants;

import com.ihidea.core.support.exception.ServiceException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 第三方接口地址常量
 *
 * @author xgl
 * @version [版本号, 2018年10月17日]
 */
@Component
public class InterfaceAddrConstant {

    @Value("${url.api.push}")
    private String pushRequestUrl;

    @Value("${url.api.invoice}")
    private String invoiceRequestUrl;

    public String getArr(int type) {
        switch (type) {
            case RpcConstant.SYSTEM_PUSH:
                return pushRequestUrl;
            case RpcConstant.SYSTEM_INVOICE:
                return invoiceRequestUrl;
            default:
                throw new ServiceException("未知的接口类型");
        }
    }
}