feat(allocation): 优化分账接收方和分账组功能- 后台管理时,分账组和接收方编号自动生成

This commit is contained in:
DaxPay
2024-12-10 20:53:15 +08:00
parent 5113993111
commit 2dfe9574bb
15 changed files with 45 additions and 29 deletions

View File

@@ -148,11 +148,11 @@ public class AliPayAllocationService {
/**
* 验证错误信息
*/
private void verifyErrorMsg(AlipayResponse alipayResponse) {
if (alipayResponse.isSuccess()) {
String errorMsg = alipayResponse.getSubMsg();
private void verifyErrorMsg(AlipayResponse response) {
if (!response.isSuccess()) {
String errorMsg = response.getSubMsg();
if (StrUtil.isBlank(errorMsg)) {
errorMsg = alipayResponse.getMsg();
errorMsg = response.getMsg();
}
log.error("分账处理失败 {}", errorMsg);
throw new TradeFailException(errorMsg);

View File

@@ -142,6 +142,8 @@ public class WechatPayV2Service {
private String qrCodePay(PayOrder payOrder, WechatPayConfig wechatPayConfig) {
WxPayService wxPayService = wechatPayConfigService.wxJavaSdk(wechatPayConfig);
WxPayUnifiedOrderRequest request = this.buildRequest(payOrder);
// NATIVE此参数必传。此id为二维码中包含的商品Id商户自行定义。
request.setProductId(payOrder.getOrderNo());
try {
var result = wxPayService.createOrder(WxPayConstants.TradeType.Specific.NATIVE, request);
return result.getCodeUrl();