-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🆕 #2834 【企业微信】新增将代开发应用或第三方应用获取的密文open_userid转换为明文userid的接口
- Loading branch information
1 parent
8a161cf
commit bb65189
Showing
5 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpOpenUseridToUserid.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpOpenUseridToUseridResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters