mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
✨ #1212 增加开放平台账号管理接口
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package me.chanjar.weixin.open.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
import me.chanjar.weixin.open.bean.result.WxOpenResult;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文档地址:https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/account/get.html
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class WxOpenGetResult extends WxOpenResult implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1196242565823312696L;
|
||||
|
||||
@SerializedName("open_appid")
|
||||
private String openAppid;
|
||||
|
||||
public static WxOpenGetResult fromJson(String json) {
|
||||
return WxGsonBuilder.create().fromJson(json, WxOpenGetResult.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
package me.chanjar.weixin.open.bean.result;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
import me.chanjar.weixin.open.util.json.WxOpenGsonBuilder;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.open.util.json.WxOpenGsonBuilder;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 基础的微信开放平台请求结果.
|
||||
@@ -26,6 +26,10 @@ public class WxOpenResult implements Serializable {
|
||||
return StringUtils.equalsIgnoreCase(errcode, "0");
|
||||
}
|
||||
|
||||
public static WxOpenResult fromJson(String json) {
|
||||
return WxGsonBuilder.create().fromJson(json, WxOpenResult.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return WxOpenGsonBuilder.create().toJson(this);
|
||||
|
||||
Reference in New Issue
Block a user