mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 07:23:01 +08:00
针对最近官网提出的用户unionID获取策略调整的公告,增加相应注释
This commit is contained in:
parent
d8250cb25e
commit
7118255be7
@ -6,6 +6,9 @@ import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140842
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WxMpOAuth2AccessToken implements Serializable {
|
public class WxMpOAuth2AccessToken implements Serializable {
|
||||||
private static final long serialVersionUID = -1345910558078620805L;
|
private static final long serialVersionUID = -1345910558078620805L;
|
||||||
@ -20,6 +23,10 @@ public class WxMpOAuth2AccessToken implements Serializable {
|
|||||||
|
|
||||||
private String scope;
|
private String scope;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&announce_id=11513156443eZYea&version=&lang=zh_CN.
|
||||||
|
* 本接口在scope参数为snsapi_base时不再提供unionID字段。
|
||||||
|
*/
|
||||||
private String unionId;
|
private String unionId;
|
||||||
|
|
||||||
public static WxMpOAuth2AccessToken fromJson(String json) {
|
public static WxMpOAuth2AccessToken fromJson(String json) {
|
||||||
|
@ -31,7 +31,13 @@ public class WxMpUser implements Serializable {
|
|||||||
private String headImgUrl;
|
private String headImgUrl;
|
||||||
private Long subscribeTime;
|
private Long subscribeTime;
|
||||||
/**
|
/**
|
||||||
|
* https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&announce_id=11513156443eZYea&version=&lang=zh_CN
|
||||||
|
* <pre>
|
||||||
* 只有在将公众号绑定到微信开放平台帐号后,才会出现该字段。
|
* 只有在将公众号绑定到微信开放平台帐号后,才会出现该字段。
|
||||||
|
* 另外,在用户未关注公众号时,将不返回用户unionID信息。
|
||||||
|
* 已关注的用户,开发者可使用“获取用户基本信息接口”获取unionID;
|
||||||
|
* 未关注用户,开发者可使用“微信授权登录接口”并将scope参数设置为snsapi_userinfo,获取用户unionID
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
private String unionId;
|
private String unionId;
|
||||||
private Integer sexId;
|
private Integer sexId;
|
||||||
|
Loading…
Reference in New Issue
Block a user