|
@@ -565,22 +565,22 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
} else {
|
|
} else {
|
|
|
result = sendRedPacketLegacyInternal(param, config);
|
|
result = sendRedPacketLegacyInternal(param, config);
|
|
|
}
|
|
}
|
|
|
- if (result.getMsg().equals("余额不足") && param.getRedPacketMode() == 1) {
|
|
|
|
|
- String backConfigStr = configService.selectConfigByKey("redPacket.config.back");
|
|
|
|
|
- if (StringUtils.isNotBlank(backConfigStr)) {
|
|
|
|
|
- List<RedPacketConfig> backConfigList = JSONArray.parseArray(backConfigStr, RedPacketConfig.class);
|
|
|
|
|
- for (RedPacketConfig redPacketConfig : backConfigList) {
|
|
|
|
|
- if (config.getIsNew() != null && config.getIsNew() == 1) {
|
|
|
|
|
- result = sendRedPacketV3Internal(param, redPacketConfig);
|
|
|
|
|
- } else {
|
|
|
|
|
- result = sendRedPacketLegacyInternal(param, redPacketConfig);
|
|
|
|
|
- }
|
|
|
|
|
- if (result.isSuccess()) {
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (result.getMsg().equals("余额不足") && param.getRedPacketMode() == 1) {
|
|
|
|
|
+// String backConfigStr = configService.selectConfigByKey("redPacket.config.back");
|
|
|
|
|
+// if (StringUtils.isNotBlank(backConfigStr)) {
|
|
|
|
|
+// List<RedPacketConfig> backConfigList = JSONArray.parseArray(backConfigStr, RedPacketConfig.class);
|
|
|
|
|
+// for (RedPacketConfig redPacketConfig : backConfigList) {
|
|
|
|
|
+// if (config.getIsNew() != null && config.getIsNew() == 1) {
|
|
|
|
|
+// result = sendRedPacketV3Internal(param, redPacketConfig);
|
|
|
|
|
+// } else {
|
|
|
|
|
+// result = sendRedPacketLegacyInternal(param, redPacketConfig);
|
|
|
|
|
+// }
|
|
|
|
|
+// if (result.isSuccess()) {
|
|
|
|
|
+// break;
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
result.put("mchId", config.getMchId() + "");
|
|
result.put("mchId", config.getMchId() + "");
|
|
|
result.put("isNew", config.getIsNew());
|
|
result.put("isNew", config.getIsNew());
|
|
|
logger.info("红包返回:{}", result);
|
|
logger.info("红包返回:{}", result);
|
|
@@ -646,7 +646,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
} catch (WxPayException e) {
|
|
} catch (WxPayException e) {
|
|
|
logger.error("商家转账支付失败:参数: {} :原因: {}", JSON.toJSONString(param), e.getMessage(), e);
|
|
logger.error("商家转账支付失败:参数: {} :原因: {}", JSON.toJSONString(param), e.getMessage(), e);
|
|
|
if ("NOT_ENOUGH".equals(e.getErrCode())) {
|
|
if ("NOT_ENOUGH".equals(e.getErrCode())) {
|
|
|
- return R.error("余额不足");
|
|
|
|
|
|
|
+ return R.error("商家余额不足");
|
|
|
}
|
|
}
|
|
|
return R.error("发送红包失败");
|
|
return R.error("发送红包失败");
|
|
|
}
|
|
}
|
|
@@ -700,7 +700,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
} catch (WxPayException e) {
|
|
} catch (WxPayException e) {
|
|
|
logger.error("商家转账支付失败:参数: {} :原因: {}", JSON.toJSONString(param), e.getMessage(), e);
|
|
logger.error("商家转账支付失败:参数: {} :原因: {}", JSON.toJSONString(param), e.getMessage(), e);
|
|
|
if ("NOT_ENOUGH".equals(e.getErrCode())) {
|
|
if ("NOT_ENOUGH".equals(e.getErrCode())) {
|
|
|
- return R.error("余额不足");
|
|
|
|
|
|
|
+ return R.error("商家余额不足");
|
|
|
}
|
|
}
|
|
|
return R.error("发送红包失败");
|
|
return R.error("发送红包失败");
|
|
|
}
|
|
}
|