TRX 1 سال پیش
والد
کامیت
b1b47e00b8

+ 1 - 1
PaymentClient/src/main/java/com/zhongshu/payment/client/pay/service/OrderPayFeignService.java

@@ -15,7 +15,7 @@ import javax.validation.Valid;
 /**
  * @author
  */
-@FeignClient("paymentserver/manager/orderPay")
+@FeignClient("paymentserver-trx/manager/orderPay")
 public interface OrderPayFeignService {
 
     /**

+ 3 - 1
PaymentServer/src/main/java/com/zhongshu/payment/server/core/controller/test/TestController.java

@@ -1,8 +1,11 @@
 package com.zhongshu.payment.server.core.controller.test;
 
+import com.github.microservice.models.type.PaymentType;
 import com.github.microservice.net.ResultContent;
+import com.github.microservice.pay.params.BasePayParam;
 import com.zhongshu.card.client.service.feign.ProjectPaySettingFeignService;
 import com.zhongshu.payment.server.core.dao.RechargeRecordDao;
+import com.zhongshu.payment.server.core.pay.OrderPayService;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import org.slf4j.Logger;
@@ -32,7 +35,6 @@ public class TestController {
 //        String topic = String.format("/wechat/pay/%s", "665fc0389083d203896d3541");
 //        sendMessageModel.setTopic(topic);
 //        sendMessageModel.setUserId("665fc0389083d203896d3541");
-
         log.info("appid:{}",appid);
         return null;
     }

+ 4 - 2
PaymentServer/src/main/java/com/zhongshu/payment/server/core/pay/OrderPayService.java

@@ -12,6 +12,7 @@ import com.zhongshu.payment.client.payModel.commn.CreateOrderParam;
 import com.zhongshu.payment.client.pay.service.OrderPayFeignService;
 import com.zhongshu.payment.server.core.dao.ExecuteMethodInfoDao;
 import com.zhongshu.payment.server.core.domain.pay.unionFrictionlessPay.ExecuteMethodInfo;
+import com.zhongshu.payment.server.core.utils.CommonUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -59,9 +60,10 @@ public class OrderPayService implements OrderPayFeignService {
         String serviceBeanName = paymentType.getServiceBeanName();
         Object beanObj = null;
         try {
-            beanObj = applicationContext.getBean(serviceBeanName);
+            // 得到bean  首字母小写
+            beanObj = applicationContext.getBean(CommonUtil.getCollectionName(serviceBeanName));
         } catch (Exception e) {
-            log.error("createOrder", e.getMessage());
+            log.error("getServiceBean: {}", e.getMessage());
         }
         if (beanObj == null) {
             return ResultContent.buildFail(String.format("未找到服务:%s", serviceBeanName));