Browse Source

同步老库格式化时间

master
huminghao 4 weeks ago
parent
commit
f2dc5f2c21

+ 17
- 2
zhywpt-app-settlew/src/main/java/cn/com/taiji/settlew/manager/issueOrder/IssueOrderRefundManagerImpl.java View File

@@ -88,7 +88,11 @@ public class IssueOrderRefundManagerImpl extends AbstractSettlewManager implemen
if (StringUtils.isEmpty(dto.getPaymentBankCardId())){
throw new ManagerException("银行卡退费时付费银行卡号必填!");
}
//todo 银行卡退费处理
//todo 银行卡退费处理预留
}else if (RefundOperateType.CASH.equals(orderRefund.getOperateType())){
//todo 现金方式预留
}else {
throw new ManagerException(orderRefund.getOperateType()+"退款方式异常!");
}

}else if("重新审核".equals(dto.getCensorResult())){
@@ -181,7 +185,18 @@ public class IssueOrderRefundManagerImpl extends AbstractSettlewManager implemen
}
} catch (Exception e) {
e.printStackTrace();
throw new ManagerException("退费申请异常!");
String errorResponse = e.getMessage(); // 获取异常信息

// 使用正则表达式提取 message 内容
java.util.regex.Pattern pattern = java.util.regex.Pattern.compile("\"message\":\"([^\"]+)\"");
java.util.regex.Matcher matcher = pattern.matcher(errorResponse);

if (matcher.find()) {
String errorMessage = matcher.group(1); // 提取匹配的内容
throw new ManagerException(errorMessage); // 返回 "申请退款金额超过订单可退金额"
} else {
throw new ManagerException("未知错误:" + errorResponse); // 如果没有匹配到 message,返回原始错误
}
}
}


Loading…
Cancel
Save