diff --git a/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenMaService.java b/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenMaService.java index 784aa2453e..f3ea593424 100644 --- a/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenMaService.java +++ b/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenMaService.java @@ -253,7 +253,7 @@ public interface WxOpenMaService extends WxMaService { * @return * @throws WxErrorException */ - WxOpenResult bindTester(String wechatid) throws WxErrorException; + WxOpenMaBindTesterResult bindTester(String wechatid) throws WxErrorException; /** * 解除绑定小程序体验者 diff --git a/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenComponentServiceImpl.java b/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenComponentServiceImpl.java index 0db4cb47f5..84f7e382b9 100644 --- a/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenComponentServiceImpl.java +++ b/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenComponentServiceImpl.java @@ -416,8 +416,8 @@ public List getTemplateDraftList() throws WxErrorException public List getTemplateList() throws WxErrorException { String responseContent = get(GET_TEMPLATE_LIST_URL, "access_token"); JsonObject response = JSON_PARSER.parse(StringUtils.defaultString(responseContent, "{}")).getAsJsonObject(); - boolean hasDraftList = response.has("template_list"); - if (hasDraftList) { + boolean hasTemplateList = response.has("template_list"); + if (hasTemplateList) { return WxOpenGsonBuilder.create().fromJson(response.getAsJsonArray("template_list"), new TypeToken>() { }.getType()); diff --git a/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenMaServiceImpl.java b/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenMaServiceImpl.java index 2696d9d27f..93c776c0e4 100644 --- a/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenMaServiceImpl.java +++ b/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenMaServiceImpl.java @@ -172,11 +172,11 @@ public String getAccountBasicInfo() throws WxErrorException { * @throws WxErrorException */ @Override - public WxOpenResult bindTester(String wechatid) throws WxErrorException { + public WxOpenMaBindTesterResult bindTester(String wechatid) throws WxErrorException { JsonObject paramJson = new JsonObject(); paramJson.addProperty("wechatid", wechatid); String response = post(API_BIND_TESTER, GSON.toJson(paramJson)); - return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class); + return WxMaGsonBuilder.create().fromJson(response, WxOpenMaBindTesterResult.class); } /** diff --git a/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/ma/WxMaOpenCommitExtInfo.java b/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/ma/WxMaOpenCommitExtInfo.java index 66aebec3fd..e7a43894a2 100644 --- a/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/ma/WxMaOpenCommitExtInfo.java +++ b/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/ma/WxMaOpenCommitExtInfo.java @@ -2,6 +2,7 @@ import com.google.gson.annotations.SerializedName; import lombok.Data; +import me.chanjar.weixin.open.util.json.WxOpenGsonBuilder; import org.apache.commons.lang3.StringUtils; import java.io.Serializable; @@ -14,6 +15,8 @@ * 微信小程序三方平台代上传代码提交额外信息对象 *

* 如果代码中已经有配置,则配置的合并规则为:除了pages和tabBar.list直接覆盖原配置,其他都为插入或同级覆盖。 + * extjson 详细说明 + * https://developers.weixin.qq.com/miniprogram/dev/devtools/ext.html#%E5%B0%8F%E7%A8%8B%E5%BA%8F%E6%A8%A1%E6%9D%BF%E5%BC%80%E5%8F%91 *

* * @author yqx @@ -31,6 +34,16 @@ public class WxMaOpenCommitExtInfo implements Serializable { */ private String extAppid; + /** + * 配置 ext.json 是否生效 + */ + private Boolean extEnable = Boolean.TRUE; + + /** + * 是否直接提交到待审核列表 + */ + private Boolean directCommit = Boolean.FALSE; + @SerializedName("ext") private Map extMap; @@ -99,4 +112,8 @@ public void addPage(String pagePath) { public static WxMaOpenCommitExtInfo INSTANCE() { return new WxMaOpenCommitExtInfo(); } + + public String toJson() { + return WxOpenGsonBuilder.create().toJson(this); + } } diff --git a/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/ma/WxMaOpenTab.java b/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/ma/WxMaOpenTab.java index 68d7cacbfd..131222e396 100644 --- a/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/ma/WxMaOpenTab.java +++ b/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/ma/WxMaOpenTab.java @@ -18,4 +18,12 @@ public class WxMaOpenTab implements Serializable { private String text; private String iconPath; private String selectedIconPath; + + + public WxMaOpenTab(String pagePath, String text) { + this.pagePath = pagePath; + this.text = text; + } + + } diff --git a/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/message/WxOpenMaSubmitAuditMessage.java b/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/message/WxOpenMaSubmitAuditMessage.java index a8d806b36e..51698a9c28 100644 --- a/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/message/WxOpenMaSubmitAuditMessage.java +++ b/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/message/WxOpenMaSubmitAuditMessage.java @@ -16,6 +16,21 @@ @Data public class WxOpenMaSubmitAuditMessage implements Serializable { + /** + * 提交审核项的一个列表(至少填写1项,至多填写5项) + */ @SerializedName("item_list") private List itemList; + + /** + * 反馈内容,不超过200字 + */ + @SerializedName("feedback_info") + private String feedbackInfo; + + /** + * 图片media_id列表,中间用“丨”分割,xx丨yy丨zz,不超过5张图片, 其中 media_id 可以通过新增临时素材接口上传而得到 + */ + @SerializedName("feedback_stuff") + private String feedbackStuff; } diff --git a/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/result/WxOpenMaBindTesterResult.java b/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/result/WxOpenMaBindTesterResult.java new file mode 100644 index 0000000000..ac06003456 --- /dev/null +++ b/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/result/WxOpenMaBindTesterResult.java @@ -0,0 +1,23 @@ +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; + +@Data +@EqualsAndHashCode(callSuper = true) +public class WxOpenMaBindTesterResult extends WxOpenResult { + + + private static final long serialVersionUID = -730133894662203011L; + + @SerializedName("userstr") + private String userstr; + + @Override + public String toString() { + return WxOpenGsonBuilder.create().toJson(this); + } + +}