yexianchao 1 ヶ月 前
コミット
1f9927c7d6

+ 2 - 3
crm-custom/src/main/resources/application-prod.yml

@@ -1,7 +1,7 @@
 spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://localhost:28571/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
+    url: jdbc:mysql://localhost:3306/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
     username: root
     password: NSH01Y0GTmUNjgg6xw80qg==
   jpa:
@@ -22,8 +22,7 @@ eureka:
     ip-address: localhost
     instance-id: ${spring.application.name}:${eureka.instance.ip-address}:${server.port}
 web:
-  upload-path: D:/server/cwg_crm/upload
-  front-path: D:/server/cwg_crm/custom-service/front
+  upload-path: ../upload
 logging:
   config: classpath:logback-prod.xml
 

+ 1 - 1
crm-custom/src/main/resources/application-test.yml

@@ -1,7 +1,7 @@
 spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://localhost:3306/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
+    url: jdbc:mysql://localhost:28571/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
     username: root
     password: NSH01Y0GTmUNjgg6xw80qg==
   jpa:

+ 4 - 4
crm-manager/src/main/resources/application-prod.yml

@@ -1,7 +1,7 @@
 spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://localhost:28571/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
+    url: jdbc:mysql://localhost:3306/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
     username: root
     password: NSH01Y0GTmUNjgg6xw80qg==
   jpa:
@@ -20,9 +20,9 @@ eureka:
 login:
   single-sign-on: true
 web:
-  upload-path: D:/server/cwg_crm/upload
-  front-path: D:/server/cwg_crm/manager-service/front
-  export-path: D:/server/cwg_crm/manager-service/export
+  upload-path: ../upload
+  export-path: ../export
+  front-path: /usr/local/golden/manager-service/front
 logging:
   config: classpath:logback-prod.xml
 

+ 3 - 3
crm-manager/src/main/resources/application-test.yml

@@ -1,7 +1,7 @@
 spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://localhost:3306/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
+    url: jdbc:mysql://localhost:28571/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
     username: root
     password: NSH01Y0GTmUNjgg6xw80qg==
   jpa:
@@ -23,8 +23,8 @@ login:
   single-sign-on: true
 web:
   upload-path: ../upload
-  export-path: C:\server\cwg_crm\export
-  front-path: /usr/local/golden_server/manager-service/front
+  export-path: ../export
+  front-path: D:/server/golden/manager-service/front
 ribbon:
   ReadTimeout: 60000
   ConnectTimeout: 60000

+ 4 - 5
crm-pay/src/main/java/com/crm/pay/controller/pay/S2sPayController.java

@@ -3,7 +3,6 @@ package com.crm.pay.controller.pay;
 import com.crm.pay.controller.base.BasePayCloseFunctionController;
 import com.crm.pay.entity.callback.S2sPayCallbackEntity;
 import com.crm.pay.service.S2sPayService;
-import com.crm.rely.backend.core.constant.Constants;
 import com.crm.rely.backend.model.constant.PayConstants;
 import com.crm.rely.backend.core.dto.base.BaseResultDto;
 import com.crm.pay.dto.PayDto;
@@ -81,12 +80,12 @@ public class S2sPayController extends BasePayCloseFunctionController {
      * @return 返回成功给第三方系统
      * @throws Exception
      */
-    @RequestMapping(value = "/callback", produces = "text/html")
-    public String callback(@RequestBody S2sPayCallbackEntity callbackEntity, HttpServletResponse response) throws Exception {
+    @RequestMapping(value = "/callback")
+    public void callback(S2sPayCallbackEntity callbackEntity, HttpServletResponse response) throws Exception {
         try {
-            return service.callback(callbackEntity);
+            service.callback(callbackEntity);
         } catch (Exception e) {
-            return Constants.FAIL;
+            response.setStatus(500);
         }
     }
 

+ 28 - 62
crm-pay/src/main/java/com/crm/pay/entity/callback/S2sPayCallbackEntity.java

@@ -1,6 +1,5 @@
 package com.crm.pay.entity.callback;
 
-import com.alibaba.fastjson.annotation.JSONField;
 import lombok.Data;
 
 import java.math.BigDecimal;
@@ -10,108 +9,75 @@ public class S2sPayCallbackEntity {
 
     private String id;
 
-    @JSONField(name = "order_number")
-    private String orderNumber;
+    private String order_number;
 
-    @JSONField(name = "order_amount")
-    private String orderAmount;
+    private String order_amount;
 
-    @JSONField(name = "order_currency")
-    private String orderCurrency;
+    private String order_currency;
 
-    @JSONField(name = "order_description")
-    private String orderDescription;
+    private String order_description;
 
-    @JSONField(name = "order_status")
-    private String orderStatus;
+    private String order_status;
 
     private String type;
 
     private String status;
 
-    @JSONField(name = "connector_name")
-    private String connectorName;
+    private String connector_name;
 
-    @JSONField(name = "rrn")
     private String rrn;
 
-    @JSONField(name = "arn")
     private String arn;
 
-    @JSONField(name = "approval_code")
-    private String approvalCode;
+    private String approval_code;
 
-    @JSONField(name = "gateway_id")
-    private String gatewayId;
+    private String gateway_id;
 
-    @JSONField(name = "extra_gateway_id")
-    private String extraGatewayId;
+    private String extra_gateway_id;
 
-    @JSONField(name = "merchant_name")
-    private String merchantCame;
+    private String merchant_name;
 
-    @JSONField(name = "mid_name")
-    private String midName;
+    private String mid_name;
 
-    @JSONField(name = "issuer_country")
-    private String issuerCountry;
+    private String issuer_country;
 
-    @JSONField(name = "issuer_bank")
-    private String issuerBank;
+    private String issuer_bank;
 
-    @JSONField(name = "card")
     private String card;
 
-    @JSONField(name = "card_expiration_date")
-    private String cardExpirationDate;
+    private String card_expiration_date;
 
-    @JSONField(name = "customer_name")
-    private String customerName;
+    private String customer_name;
 
-    @JSONField(name = "customer_email")
-    private String customerEmail;
+    private String customer_email;
 
-    @JSONField(name = "customer_country")
-    private String customerCountry;
+    private String customer_country;
 
-    @JSONField(name = "customer_state")
-    private String customerState;
+    private String customer_state;
 
-    @JSONField(name = "customer_city")
-    private String customerCity;
+    private String customer_city;
 
-    @JSONField(name = "customerAddress")
-    private String customerAddress;
+    private String customer_addres;
 
-    @JSONField(name = "customerIp")
-    private String customerIp;
+    private String customer_ip;
 
-    @JSONField(name = "date")
     private String date;
 
-    @JSONField(name = "recurring_init_trans_id")
-    private String recurringInitTransId;
+    private String recurring_init_trans_id;
 
-    @JSONField(name = "recurring_token")
-    private String recurringToken;
+    private String recurring_token;
 
-    @JSONField(name = "schedule_id")
-    private String scheduleId;
+    private String schedule_id;
 
-    @JSONField(name = "exchange_rate")
     private BigDecimal exchange_rate;
 
-    @JSONField(name = "exchange_rate_base")
-    private BigDecimal exchangeRateBase;
+    private BigDecimal exchange_rate_base;
 
-    @JSONField(name = "exchange_currency")
-    private String exchangeCurrency;
+    private String exchange_currency;
 
-    @JSONField(name = "exchange_amount")
-    private Integer exchangeAmount;
+    private Integer exchange_amount;
 
-    @JSONField(name = "extendedData")
-    private String extendedData;
+    private String extended_data;
 
     private String hash;
 }

+ 9 - 9
crm-pay/src/main/java/com/crm/pay/service/impl/pay/S2sPayServiceImpl.java

@@ -74,26 +74,26 @@ public class S2sPayServiceImpl extends BasePayServiceImpl implements S2sPayServi
             return Constants.FAIL;
         }
         //获取配置
-        //S2sPayPropertyEntity payProperty = getPayProperty(PayConstants.S2S_PAY_KEY, S2sPayPropertyEntity.class);
+        /*S2sPayPropertyEntity payProperty = getPayProperty(PayConstants.S2S_PAY_KEY, S2sPayPropertyEntity.class);
 
-        /*boolean validate = validate(callbackEntity, payProperty.getPassword());
+        boolean validate = validate(callbackEntity, payProperty.getPassword());
         if (!validate) {
             return Constants.FAIL;
         }*/
 
         //验证传输数据
         int status = PayConstants.CALLBACE_PROCESSING_STATUS;
-        if ("success".equals(callbackEntity.getStatus()) && "settled".equals(callbackEntity.getOrderStatus())) {
+        if ("success".equals(callbackEntity.getStatus()) && "settled".equals(callbackEntity.getOrder_status())) {
             status = PayConstants.CALLBACE_SUCCESS_STATUS;
-        } else if ("fail".equals(callbackEntity.getStatus()) || "decline".equals(callbackEntity.getOrderStatus())
-                || "refund".equals(callbackEntity.getOrderStatus())|| "reversal".equals(callbackEntity.getOrderStatus())|| "chargeback".equals(callbackEntity.getOrderStatus())) {
+        } else if ("fail".equals(callbackEntity.getStatus()) || "decline".equals(callbackEntity.getOrder_status())
+                || "refund".equals(callbackEntity.getOrder_status())|| "reversal".equals(callbackEntity.getOrder_status())|| "chargeback".equals(callbackEntity.getOrder_status())) {
             status = PayConstants.CALLBACE_FAIL_STATUS;
         }
 
         FinanceDepositCallbackUpdateEntity balanceCallbackUpdateEntity =
-                getFinanceDepositCallbackUpdateEntity(callbackEntity.getOrderNumber(), callbackEntity.getId(),
+                getFinanceDepositCallbackUpdateEntity(callbackEntity.getOrder_number(), callbackEntity.getId(),
                         status, callbackEntity);
-        balanceCallbackUpdateEntity.setTransformAmount(new BigDecimal(callbackEntity.getOrderAmount()));
+        balanceCallbackUpdateEntity.setTransformAmount(new BigDecimal(callbackEntity.getOrder_amount()));
         /**
          * 更新数据
          */
@@ -202,11 +202,11 @@ public class S2sPayServiceImpl extends BasePayServiceImpl implements S2sPayServi
 
         String _sign = callDataEntity.getHash();
 
-        String md5 = MD5Util.getMD5((callDataEntity.getOrderNumber()+callDataEntity.getOrderAmount()+callDataEntity.getOrderCurrency()+callDataEntity.getOrderDescription()+password).toUpperCase());
+        String md5 = MD5Util.getMD5((callDataEntity.getId()+callDataEntity.getOrder_number()+callDataEntity.getOrder_amount()+callDataEntity.getOrder_currency()+callDataEntity.getOrder_description()+password).toUpperCase());
         String hash = ShaUtil.sha("SHA-1", md5);
 
         log.info(String.format("order no:%scallback result sign compare--callback sign:%s, encryption sign result:%s"
-                , callDataEntity.getOrderNumber(), _sign, hash));
+                , callDataEntity.getOrder_number(), _sign, hash));
         return hash.equals(_sign);
     }
 

+ 2 - 2
crm-pay/src/main/resources/application-prod.yml

@@ -1,7 +1,7 @@
 spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://localhost:28571/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
+    url: jdbc:mysql://localhost:3306/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
     username: root
     password: NSH01Y0GTmUNjgg6xw80qg==
   jpa:
@@ -18,7 +18,7 @@ eureka:
     serviceUrl:
       defaultZone: http://admin:admin123456@localhost:7000/eureka
 web:
-  upload-path: /root/server/crm/upload
+  upload-path: ../upload
 logging:
   config: classpath:logback-prod.xml
 

+ 1 - 1
crm-pay/src/main/resources/application-test.yml

@@ -1,7 +1,7 @@
 spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://localhost:3306/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
+    url: jdbc:mysql://localhost:28571/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
     username: root
     password: NSH01Y0GTmUNjgg6xw80qg==
   jpa:

+ 1 - 1
crm-pay/src/main/resources/mapper/SysRemittanceChannelMapper.xml

@@ -6,7 +6,7 @@
     <select id="getAllByValidOrderBySubIndex"
             parameterType="com.crm.rely.backend.model.entity.sys.remittance.channel.SysRemittanceChannelListEntity"
             resultType="com.crm.rely.backend.model.pojo.view.SysRemittanceChannelView">
-        SELECT rate_view.rate finance_rate,rc.*
+        SELECT ANY_VALUE(rate_view.rate) finance_rate,rc.*
         from sys_remittance_channel rc
         JOIN (
         SELECT