From 829e638cdd103b441766e88156903755733dca7a Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 28 Aug 2024 14:42:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/cweb/controller/CommonController.java | 4 ++-- .../java/com/hfkj/service/hlt/HltCardRefundService.java | 6 +++--- .../com/hfkj/service/hlt/HuiLianTongUnionCardService.java | 8 ++------ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/cweb/src/main/java/com/cweb/controller/CommonController.java b/cweb/src/main/java/com/cweb/controller/CommonController.java index 20212a2..d5f0c63 100644 --- a/cweb/src/main/java/com/cweb/controller/CommonController.java +++ b/cweb/src/main/java/com/cweb/controller/CommonController.java @@ -73,8 +73,8 @@ public class CommonController { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, refundObj.getString("respMessage")); } JSONObject consumptionResult = HuiLianTongUnionCardService.resolveResponse(refundObj.getString("data")); - if (!(consumptionResult.getBoolean("success") || Objects.equals(consumptionResult.getString("message"), "原交易已撤销,不可再次操作"))) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败!"+consumptionResult.getString("message")); + if (consumptionResult.getBoolean("success") != true) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "交易失败!"+consumptionResult.getString("message")); } return ResponseMsgUtil.success(consumptionResult); diff --git a/service/src/main/java/com/hfkj/service/hlt/HltCardRefundService.java b/service/src/main/java/com/hfkj/service/hlt/HltCardRefundService.java index 5956245..39e8d80 100644 --- a/service/src/main/java/com/hfkj/service/hlt/HltCardRefundService.java +++ b/service/src/main/java/com/hfkj/service/hlt/HltCardRefundService.java @@ -62,8 +62,8 @@ public class HltCardRefundService { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, refundObj.getString("respMessage")); } JSONObject consumptionResult = HuiLianTongUnionCardService.resolveResponse(refundObj.getString("data")); - if (!(consumptionResult.getBoolean("success") || Objects.equals(consumptionResult.getString("message"), "原交易已撤销,不可再次操作"))) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败!"+consumptionResult.getString("message")); + if (consumptionResult.getBoolean("success") != true) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "交易失败!"+consumptionResult.getString("message")); } oldCardRecord.setRefundTime(new Date()); oldCardRecord.setPayStatus(HltCardRecordPayStatusEnum.status3.getCode()); @@ -119,7 +119,7 @@ public class HltCardRefundService { } // 响应参数 JSONObject payConsumptionResult = HuiLianTongUnionCardService.resolveResponse(consumption.getString("data")); - if (consumptionResult.getBoolean("success") != true) { + if (payConsumptionResult.getBoolean("success") != true) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, payConsumptionResult.getString("message")); } newRecord.setPaySerialNo(consumptionResult.getString("orderId")); diff --git a/service/src/main/java/com/hfkj/service/hlt/HuiLianTongUnionCardService.java b/service/src/main/java/com/hfkj/service/hlt/HuiLianTongUnionCardService.java index 74c3b34..256b522 100644 --- a/service/src/main/java/com/hfkj/service/hlt/HuiLianTongUnionCardService.java +++ b/service/src/main/java/com/hfkj/service/hlt/HuiLianTongUnionCardService.java @@ -252,15 +252,11 @@ public class HuiLianTongUnionCardService { public static JSONObject resolveResponse(String param) { String data = param.replace("\\n", ""); String decodeData = DesUtil.decode(HLT_CARD_SIGN_CODE, data, Charset.forName("UTF-8")); - - log.info("============请求任务Start============="); - log.info("解析响应的参数-请求参数: " + data); + log.info("响应data参数: " + data); JSONObject returnObject = JSONObject.parseObject(decodeData); - log.info("解析响应的参数-响应参数: " + returnObject.toJSONString()); - log.info("============请求任务End=============="); - + log.info("解析响应参数: " + returnObject.toJSONString()); return returnObject; }