mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-05-03 04:13:37 +08:00
🎨 优化小程序版本信息接口返回
This commit is contained in:
parent
d056cc8abe
commit
18a79b5b6c
@ -713,6 +713,6 @@ public interface WxOpenMaService extends WxMaService {
|
||||
* @return the wx open result
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxOpenResult getVersionInfo() throws WxErrorException;
|
||||
WxOpenVersioninfoResult getVersionInfo() throws WxErrorException;
|
||||
|
||||
}
|
||||
|
@ -441,10 +441,9 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxOpenResult getVersionInfo() throws WxErrorException {
|
||||
public WxOpenVersioninfoResult getVersionInfo() throws WxErrorException {
|
||||
JsonObject params = new JsonObject();
|
||||
String response = post(API_GET_VERSION_INFO, GSON.toJson(params));
|
||||
WxOpenResult result = WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
|
||||
return result;
|
||||
return WxMaGsonBuilder.create().fromJson(response, WxOpenVersioninfoResult.class);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,74 @@
|
||||
package me.chanjar.weixin.open.bean.result;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.open.util.json.WxOpenGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序版本信息
|
||||
*
|
||||
* @author cocoa
|
||||
* @date 20220727
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user