-
-
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.
🆕 #2752 【小程序】增加查询小程序版本信息的接口以及第三方userid_to_openuserid的接口
- Loading branch information
Showing
7 changed files
with
128 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
35 changes: 35 additions & 0 deletions
35
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUseridToOpenUserid.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,35 @@ | ||
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转换为第三方应用的userid | ||
* 中间对象 | ||
* Created by gxh0797 on 2022.07.26. | ||
* | ||
*/ | ||
@Data | ||
public class WxCpUseridToOpenUserid implements Serializable { | ||
private static final long serialVersionUID = 1420065684270213578L; | ||
|
||
@Override | ||
public String toString() { | ||
return WxCpGsonBuilder.create().toJson(this); | ||
} | ||
|
||
public static WxCpUseridToOpenUserid fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, WxCpUseridToOpenUserid.class); | ||
} | ||
|
||
@SerializedName("userid") | ||
private String userid; | ||
|
||
@SerializedName("open_userid") | ||
private String openUserid; | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpUseridToOpenUseridResult.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,42 @@ | ||
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转换为第三方应用的userid | ||
* Created by gxh0797 on 2022.07.26. | ||
* | ||
*/ | ||
@Data | ||
public class WxCpUseridToOpenUseridResult implements Serializable { | ||
private static final long serialVersionUID = 1420065684270213578L; | ||
|
||
@Override | ||
public String toString() { | ||
return WxCpGsonBuilder.create().toJson(this); | ||
} | ||
|
||
public static WxCpUseridToOpenUseridResult fromJson(String json) { | ||
return WxCpGsonBuilder.create().fromJson(json, WxCpUseridToOpenUseridResult.class); | ||
} | ||
|
||
@SerializedName("errcode") | ||
private Integer errCode; | ||
|
||
@SerializedName("errmsg") | ||
private String errMsg; | ||
|
||
@SerializedName("open_userid_list") | ||
private List<WxCpUseridToOpenUserid> openUseridList; | ||
|
||
@SerializedName("invalid_userid_list") | ||
private List<String> invalidUseridList; | ||
|
||
|
||
} |
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
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
我也正想提PR,刚好你提交了,老哥, 你这个返回类型改下吧
`@Data
@EqualsAndHashCode(callSuper = true)
public class WxOpenVersioninfoResult extends WxOpenResult {
private static final long serialVersionUID = -1042219138582803275L;
@SerializedName("exp_info")
ExpInfo expInfo;
@SerializedName("release_info")
ReleaseInfo releaseInfo;
@OverRide
public String toString() {
return WxOpenGsonBuilder.create().toJson(this);
}
@DaTa
public static class ReleaseInfo {
/**
* 发布线上版的时间
/
@SerializedName("release_time")
private Long releaseTime;
/*
* 线上版版本信息
/
@SerializedName("release_version")
private String releaseVersion;
/*
* 线上版本描述
*/
@SerializedName("release_desc")
private String releaseDesc;
}
@DaTa
public static class ExpInfo {
/**
* 提交体验版的时间
/
@SerializedName("exp_time")
private Long expTime;
/*
* 头像已使用修改次数(本月)
/
@SerializedName("exp_version")
private String expVersion;
/*
* 头像修改次数总额度(本月)
*/
@SerializedName("exp_desc")
private String expDesc;
}
}
`