--hotfix修复微信改版导致小程序授权登录失败
This commit is contained in:
@ -94,10 +94,10 @@ public class AuthService {
|
||||
|
||||
WxMaUserInfo wxMpUser = wxMaService.getUserService()
|
||||
.getUserInfo(session.getSessionKey(), encryptedData, iv);
|
||||
String openid = wxMpUser.getOpenId();
|
||||
String openid = session.getOpenid();
|
||||
//如果开启了UnionId
|
||||
if (StrUtil.isNotBlank(wxMpUser.getUnionId())) {
|
||||
openid = wxMpUser.getUnionId();
|
||||
if (StrUtil.isNotBlank(session.getUnionid())) {
|
||||
openid = session.getUnionid();
|
||||
}
|
||||
|
||||
YxUser yxUser = userService.getOne(Wrappers.<YxUser>lambdaQuery()
|
||||
|
@ -12,7 +12,7 @@
|
||||
<artifactId>yshop-common</artifactId>
|
||||
<name>公共模块</name>
|
||||
<properties>
|
||||
<weixin-java.version>4.0.0</weixin-java.version>
|
||||
<weixin-java.version>4.0.7.B</weixin-java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -153,7 +153,7 @@ public class WeiXinSubscribeService {
|
||||
.templateId(templateId)
|
||||
.page(page)
|
||||
.build();
|
||||
map.forEach( (k,v)-> { wxMaSubscribeMessage.addData(new WxMaSubscribeMessage.Data(k, v));} );
|
||||
map.forEach( (k,v)-> { wxMaSubscribeMessage.addData(new WxMaSubscribeMessage.MsgData(k, v));} );
|
||||
WxMaService wxMaService = WxMaConfiguration.getWxMaService();
|
||||
try {
|
||||
wxMaService.getMsgService().sendSubscribeMsg(wxMaSubscribeMessage);
|
||||
|
@ -58,7 +58,8 @@ import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static cn.binarywang.wx.miniapp.api.WxMaLiveService.CREATE_ROOM;
|
||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Broadcast.Room.CREATE_ROOM;
|
||||
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
Reference in New Issue
Block a user