From 0dd1384e75460f76ea0592a9a6d860176839a1be Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期日, 06 六月 2021 22:50:10 +0800
Subject: [PATCH] 优化广告工鞥呢
---
service-front/src/main/java/com/java110/front/smo/payment/adapt/fuiouPay/FuiouOweFeeToNotifyAdapt.java | 30 ++++++++++++++++++++++++------
1 files changed, 24 insertions(+), 6 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
old mode 100644
new mode 100755
index b09762d..8d9e739
--- 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
@@ -77,7 +77,7 @@
* @return
* @throws Exception
*/
- public String confirmPayFee(String param) {
+ public String confirmPayFee(String param, String wId) {
JSONObject resJson = new JSONObject();
resJson.put("result_code", "010002");
resJson.put("result_msg", "澶辫触");
@@ -87,7 +87,7 @@
String resultCode = map.getString("result_code");
if ("000000".equals(resultCode)) {
//鏇存柊鏁版嵁
- int result = confirmPayFee(map);
+ int result = confirmPayFee(map, wId);
if (result > 0) {
//鏀粯鎴愬姛
resJson.put("result_code", "000000");
@@ -103,8 +103,7 @@
}
- public int confirmPayFee(JSONObject map) {
- String wId = map.get("wId").toString();
+ public int confirmPayFee(JSONObject map, String wId) {
wId = wId.replace(" ", "+");
ResponseEntity<String> responseEntity = null;
@@ -133,6 +132,7 @@
//鏌ヨ鐢ㄦ埛ID
JSONObject paramIn = JSONObject.parseObject(order);
paramIn.put("oId", orderId);
+ freshFees(paramIn);
String url = ServiceConstant.SERVICE_API_URL + "/api/fee.payOweFee";
responseEntity = this.callCenterService(restTemplate, "-1", paramIn.toJSONString(), url, HttpMethod.POST);
@@ -140,6 +140,25 @@
return 0;
}
return 1;
+ }
+
+
+ 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", "");
+ }
+ }
}
@@ -168,9 +187,8 @@
responseEntity = new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
} finally {
logger.debug("璇锋眰鍦板潃涓�,{} 璇锋眰涓績鏈嶅姟淇℃伅锛寋},涓績鏈嶅姟杩斿洖淇℃伅锛寋}", url, httpEntity, responseEntity);
- return responseEntity;
}
-
+ return responseEntity;
}
--
Gitblit v1.8.0