Commit 9d4b2bf8b1e8df434aa8a52a302c6c628008465d
1 parent
859f1ca2
224 fix(system): 当用户没有绑定微信小程序时获取到socialUser为null,会导致发货失败,对应 https://gitee.com/zh…
…ijiantianya/yudao-cloud/pulls/224/files
Showing
1 changed file
with
1 additions
and
1 deletions
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/api/social/SocialClientApiImpl.java
| ... | ... | @@ -85,7 +85,7 @@ public class SocialClientApiImpl implements SocialClientApi { |
| 85 | 85 | // 2. 获得社交用户 |
| 86 | 86 | SocialUserRespDTO socialUser = socialUserService.getSocialUserByUserId(reqDTO.getUserType(), reqDTO.getUserId(), |
| 87 | 87 | SocialTypeEnum.WECHAT_MINI_PROGRAM.getType()); |
| 88 | - if (StrUtil.isBlankIfStr(socialUser.getOpenid())) { | |
| 88 | + if (ObjUtil.isNull(socialUser) || StrUtil.isBlankIfStr(socialUser.getOpenid())) { | |
| 89 | 89 | log.warn("[sendWxaSubscribeMessage][reqDTO({}) 发送订阅消息失败,原因:会员 openid 缺失]", reqDTO); |
| 90 | 90 | return; |
| 91 | 91 | } | ... | ... |