提交代码

dev
胡锐 2 months ago
parent a25ac3f9b6
commit 829e638cdd
  1. 4
      cweb/src/main/java/com/cweb/controller/CommonController.java
  2. 6
      service/src/main/java/com/hfkj/service/hlt/HltCardRefundService.java
  3. 8
      service/src/main/java/com/hfkj/service/hlt/HuiLianTongUnionCardService.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);

@ -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"));

@ -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;
}

Loading…
Cancel
Save