Prechádzať zdrojové kódy

feat : 支付逻辑的代码修改

bilingfeng 2 rokov pred
rodič
commit
60fda1d375

+ 1 - 1
game-module/game-sdk/src/main/java/com/zanxiang/sdk/SDKApplication.java

@@ -14,7 +14,7 @@ public class SDKApplication {
 
     public static void main(String[] args) {
         SpringApplication.run(SDKApplication.class, args);
-        System.out.println("赞象SDK服务启动成功 ( ´・・)ノ(._.`) \n" +
+        System.out.println("赞象SDK服务启动成功1111 ( ´・・)ノ(._.`) \n" +
                 " ______  __     __     \n" +
                 "/_____/\\/__/\\ /__/\\    \n" +
                 "\\:::__\\/\\ \\::\\\\:.\\ \\   \n" +

+ 4 - 7
game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/Impl/pay/PayService.java

@@ -15,8 +15,6 @@ import com.zanxiang.sdk.service.OrderPayService;
 import com.zanxiang.sdk.service.PlatformOrderService;
 import lombok.extern.slf4j.Slf4j;
 import org.jdom.JDOMException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -37,7 +35,6 @@ import java.util.Date;
 @Slf4j
 @Service
 public class PayService {
-    private static final Logger logger = LoggerFactory.getLogger(PayService.class);
 
     @Autowired
     public PlatformOrderService platformOrderService;
@@ -48,7 +45,6 @@ public class PayService {
     @Value("${server.domain}")
     public String domain;
 
-
     /**
      * 自定义参数
      */
@@ -87,11 +83,11 @@ public class PayService {
             String payCode = PayWayEnum.getCodeByNum(product.getPayWay());
             OrderPayService device = getDevice(payCode);
             ResultMap result = device.create(product);
-            logger.info("订单支付参数生成 ProductPayParamBO:{},result:{}", product, result);
+            log.info("订单支付参数生成 ProductPayParamBO:{},result:{}", product, result);
             return result;
         } catch (RuntimeException e) {
             e.printStackTrace();
-            logger.info("订单支付参数生成异常 ProductPayParamBO:{},e:{}", product, e);
+            log.info("订单支付参数生成异常 ProductPayParamBO:{},e:{}", product, e);
             return ResultMap.error(e.getMessage());
         }
     }
@@ -129,6 +125,7 @@ public class PayService {
      */
     private static OrderPayService getDevice(String payCode) {
         try {
+            log.error("获取支付驱动方式, payCode : {}", payCode);
             return SpringUtils.getBean(payCode + "Service");
         } catch (BeansException e) {
             throw new BaseException("支付方式不存在");
@@ -164,7 +161,7 @@ public class PayService {
      * @param realAmount      真实金额
      * @param merchantOrderNo 订单流水号
      * @param gamePayWayId    具体游戏支付方式id
-     * @return
+     * @return : 返回支付状态
      */
     public Boolean paySuccess(String orderNo, String realAmount, String merchantOrderNo, String gamePayWayId) {
         PlatformOrderBO bo = new PlatformOrderBO();