Skip to content

Commit

Permalink
🎨 #3438 【企业微信】第三方应用开发获取登录/访问用户身份接口返回字段调整
Browse files Browse the repository at this point in the history
  • Loading branch information
binarywang committed Dec 13, 2024
1 parent a4e3af0 commit 7494de9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,24 @@
@Data
@EqualsAndHashCode(callSuper = true)
public class WxCpTpUserInfo extends WxCpBaseResp {

private static final long serialVersionUID = -5028321625140879571L;

/**
* 用户所属企业的corpid
*/
@SerializedName("CorpId")
@SerializedName("corpid")
private String corpId;

/**
* 用户在企业内的UserID,如果该企业与第三方应用有授权关系时,返回明文UserId,否则返回密文UserId
*/
@SerializedName("UserId")
@SerializedName("userid")
private String userId;

/**
* 手机设备号(由企业微信在安装时随机生成,删除重装会改变,升级不受影响)
*/
@SerializedName("DeviceId")
private String deviceId;

/**
* 成员票据,最大为512字节。
* scope为snsapi_userinfo或snsapi_privateinfo,且用户在应用可见范围之内时返回此参数。
* 后续利用该参数可以获取用户信息或敏感信息,参见:https://work.weixin.qq.com/api/doc/90001/90143/91122
* 后续利用该参数可以获取用户信息或敏感信息,参见:<a href="https://work.weixin.qq.com/api/doc/90001/90143/91122">...</a>
*/
@SerializedName("user_ticket")
private String userTicket;
Expand All @@ -54,6 +47,12 @@ public class WxCpTpUserInfo extends WxCpBaseResp {
@SerializedName("open_userid")
private String openUserId;

/**
非企业成员的标识,对当前服务商唯一
*/
@SerializedName("openid")
private String openid;

/**
* From json wx cp tp user info.
*
Expand All @@ -64,8 +63,4 @@ public static WxCpTpUserInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpTpUserInfo.class);
}

public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,9 @@ public interface WxCpTpService {

/**
* <pre>
* 获取访问用户身份
* 获取登录/访问用户身份
* 1、<a href="https://developer.work.weixin.qq.com/document/path/91121">网页授权登录对应的文档</a>
* 2、<a href="https://developer.work.weixin.qq.com/document/path/98179">企业微信web登录对应的文档</a>
* </pre>
*
* @param code the code
Expand Down

0 comments on commit 7494de9

Please sign in to comment.