|
@@ -1023,9 +1023,13 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
amount = video.getRedPacketMoney();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
// 准备发送红包参数
|
|
|
WxSendRedPacketParam packetParam = new WxSendRedPacketParam();
|
|
|
packetParam.setOpenId(user.getMpOpenId());
|
|
|
+
|
|
|
+
|
|
|
// 来源是小程序切换openId
|
|
|
if (param.getSource() == 2) {
|
|
|
//处理多小程序问题
|
|
@@ -1042,11 +1046,17 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
//查出公司绑定openid并赋值
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ //判断服务号配置是否存在
|
|
|
+ if (StringUtils.isNotEmpty(config.getMpAppId())){
|
|
|
+ packetParam.setMpAppId(config.getMpAppId());
|
|
|
+ }
|
|
|
packetParam.setAmount(amount);
|
|
|
packetParam.setSource(param.getSource());
|
|
|
packetParam.setRedPacketMode(config.getRedPacketMode());
|
|
|
packetParam.setCompanyId(param.getCompanyId());
|
|
|
packetParam.setAppId(param.getAppId());
|
|
|
+ packetParam.setUser(user);
|
|
|
|
|
|
System.out.println("红包金额"+amount);
|
|
|
System.out.println("红包商户号"+packetParam);
|
|
@@ -1209,6 +1219,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
if (user.getMpOpenId()!=null&&!isNewWxMerchant){
|
|
|
packetParam.setOpenId(user.getMpOpenId());
|
|
|
}else {
|
|
|
+ //修复数据
|
|
|
FsUserWx fsUserWx = fsUserWxService.selectByAppIdAndUserId(param.getAppId(),user.getUserId(),1);
|
|
|
if (fsUserWx ==null){
|
|
|
if (user.getCourseMaOpenId()==null){
|