|
@@ -541,6 +541,12 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
|
|
|
// 内部方法:处理旧版本的发红包逻辑
|
|
|
private R sendRedPacketLegacyInternal(WxSendRedPacketParam param, RedPacketConfig config) {
|
|
|
+ //如果服务号的配置存在,小程序红包接口可以使用服务号来发红包,重新赋值
|
|
|
+ //仅老商户支持
|
|
|
+ if (param.getUser().getMpOpenId()!=null && StringUtils.isNotEmpty(param.getMpAppId())){
|
|
|
+ config.setAppId(param.getMpAppId());
|
|
|
+ param.setOpenId(param.getUser().getMpOpenId());
|
|
|
+ }
|
|
|
WxPayConfig payConfig = new WxPayConfig();
|
|
|
BeanUtils.copyProperties(config, payConfig);
|
|
|
WxPayService wxPayService = new WxPayServiceImpl();
|
|
@@ -550,6 +556,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
TransferBatchesRequest request = new TransferBatchesRequest();
|
|
|
request.setAppid(config.getAppId());
|
|
|
|
|
|
+
|
|
|
// todo 如果未配置负载均衡请还原原本的单号方式
|
|
|
// String code = IdUtil.getSnowflake(0, 0).nextIdStr();
|
|
|
String code = OrderCodeUtils.getOrderSn();
|