From 6df1b67b41840f2990e9d08fb14a0f5710516f30 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期三, 23 十二月 2020 09:41:10 +0800
Subject: [PATCH] 优化代码 手机支付问题
---
service-front/src/main/java/com/java110/front/smo/payment/adapt/fuiouPay/FuiouOweFeeToNotifyAdapt.java | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/service-front/src/main/java/com/java110/front/smo/payment/adapt/fuiouPay/FuiouOweFeeToNotifyAdapt.java b/service-front/src/main/java/com/java110/front/smo/payment/adapt/fuiouPay/FuiouOweFeeToNotifyAdapt.java
index 743639f..bd1088f 100644
--- a/service-front/src/main/java/com/java110/front/smo/payment/adapt/fuiouPay/FuiouOweFeeToNotifyAdapt.java
+++ b/service-front/src/main/java/com/java110/front/smo/payment/adapt/fuiouPay/FuiouOweFeeToNotifyAdapt.java
@@ -21,7 +21,7 @@
import com.java110.dto.fee.FeeDto;
import com.java110.dto.smallWeChat.SmallWeChatDto;
import com.java110.front.properties.WechatAuthProperties;
-import com.java110.front.smo.payment.adapt.IPayNotifyAdapt;
+import com.java110.front.smo.payment.adapt.IOweFeeToNotifyAdapt;
import com.java110.utils.cache.CommonCache;
import com.java110.utils.constant.CommonConstant;
import com.java110.utils.constant.ServiceConstant;
@@ -58,7 +58,7 @@
*/
@Component(value = "fuiouOweFeeToNotifyAdapt")
-public class FuiouOweFeeToNotifyAdapt implements IPayNotifyAdapt {
+public class FuiouOweFeeToNotifyAdapt implements IOweFeeToNotifyAdapt {
private static final Logger logger = LoggerFactory.getLogger(FuiouOweFeeToNotifyAdapt.class);
@@ -133,7 +133,8 @@
//鏌ヨ鐢ㄦ埛ID
JSONObject paramIn = JSONObject.parseObject(order);
paramIn.put("oId", orderId);
- String url = ServiceConstant.SERVICE_API_URL + "/api/feeApi/payOweFee";
+ freshFees(paramIn);
+ String url = ServiceConstant.SERVICE_API_URL + "/api/fee.payOweFee";
responseEntity = this.callCenterService(restTemplate, "-1", paramIn.toJSONString(), url, HttpMethod.POST);
if (responseEntity.getStatusCode() != HttpStatus.OK) {
@@ -143,6 +144,25 @@
}
+ private void freshFees(JSONObject paramIn) {
+ if (!paramIn.containsKey("fees")) {
+ return;
+ }
+
+ JSONArray fees = paramIn.getJSONArray("fees");
+ JSONObject fee = null;
+ for (int feeIndex = 0; feeIndex < fees.size(); feeIndex++) {
+ fee = fees.getJSONObject(feeIndex);
+ if (fee.containsKey("deadlineTime")) {
+ fee.put("startTime", fee.getString("endTime"));
+ fee.put("endTime", fee.getString("deadlineTime"));
+ fee.put("receivedAmount", fee.getString("feePrice"));
+ fee.put("state", "");
+ }
+ }
+ }
+
+
/**
* 璋冪敤涓績鏈嶅姟
*
--
Gitblit v1.8.0