mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🆕 #2834 【企业微信】新增将代开发应用或第三方应用获取的密文open_userid转换为明文userid的接口
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
package me.chanjar.weixin.cp.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* userid转换
|
||||
* 将代开发应用或第三方应用获取的密文open_userid转换为明文userid
|
||||
* 中间对象
|
||||
* @author yiyingcanfeng
|
||||
*/
|
||||
@Data
|
||||
public class WxCpOpenUseridToUserid implements Serializable {
|
||||
private static final long serialVersionUID = 1714909184316350423L;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return WxCpGsonBuilder.create().toJson(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* From json wx cp open userid to userid result.
|
||||
*
|
||||
* @param json the json
|
||||
* @return the wx cp open userid to userid result.
|
||||
*/
|
||||
public static WxCpOpenUseridToUserid fromJson(String json) {
|
||||
return WxCpGsonBuilder.create().fromJson(json, WxCpOpenUseridToUserid.class);
|
||||
}
|
||||
|
||||
@SerializedName("userid")
|
||||
private String userid;
|
||||
|
||||
@SerializedName("open_userid")
|
||||
private String openUserid;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package me.chanjar.weixin.cp.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* userid转换
|
||||
* 将代开发应用或第三方应用获取的密文open_userid转换为明文userid
|
||||
* @author yiyingcanfeng
|
||||
*/
|
||||
@Data
|
||||
public class WxCpOpenUseridToUseridResult implements Serializable {
|
||||
private static final long serialVersionUID = 5179329535139861515L;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return WxCpGsonBuilder.create().toJson(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* From json wx cp open userid to userid result.
|
||||
*
|
||||
* @param json the json
|
||||
* @return the wx cp open userid to userid result
|
||||
*/
|
||||
public static WxCpOpenUseridToUseridResult fromJson(String json) {
|
||||
return WxCpGsonBuilder.create().fromJson(json, WxCpOpenUseridToUseridResult.class);
|
||||
}
|
||||
|
||||
@SerializedName("errcode")
|
||||
private Integer errCode;
|
||||
|
||||
@SerializedName("errmsg")
|
||||
private String errMsg;
|
||||
|
||||
@SerializedName("userid_list")
|
||||
private List<WxCpUseridToOpenUserid> useridList;
|
||||
|
||||
@SerializedName("invalid_open_userid_list")
|
||||
private List<String> invalidOpenUseridList;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user