ThirdBankRoute.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:aaden-pay 作者:
public ThirdBankVerifyService route(BankRequest request) throws Exception {
    if (request == null || request.getInfo().getChannel() == null) {
        throw new Exception("当前暂不支持的第三方支付渠道");
    }

    if (thirdClassList == null)
        throw new Exception("当前暂不支持的第三方支付渠道");

    for (Class<?> clz : thirdClassList) {
        ChannelValue comment = clz.getAnnotation(ChannelValue.class);
        if (comment == null)
            continue;
        if (comment.channel() != request.getInfo().getChannel())
            continue;

        Service service = clz.getAnnotation(Service.class);
        if (service == null)
            continue;

        return (ThirdBankVerifyService) SpringContextHelper.getBean(service.value());
    }

    throw new Exception("当前暂不支持的第三方支付渠道");
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号