public ThirdPayService route(PayChannel channel, PayType payType) throws Exception {
if (thirdClassList == null)
throw new Exception(ErrorMsgConstant.CHANNEL_NOT_SUPPORT);
for (Class<?> clz : thirdClassList) {
ChannelValue comment = clz.getAnnotation(ChannelValue.class);
if (comment == null)
continue;
if (comment.channel() != channel)
continue;
if (!ArrayUtils.contains(comment.payType(), payType))
continue;
Service service = clz.getAnnotation(Service.class);
if (service == null)
continue;
return (ThirdPayService) SpringContextHelper.getBean(service.value());
}
throw new Exception(ErrorMsgConstant.CHANNEL_NOT_SUPPORT);
}
ThirdPayRoute.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:aaden-pay
作者:
评论列表
文章目录