mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🐛 修复几个问题
1.修复微信公众号无法模板消息行业:其他 2.修复第三方平台无法上传标准模板的代码到小程序 3.修复小程序代码模板类型类字段拼写错误
This commit is contained in:
@@ -3,7 +3,6 @@ package me.chanjar.weixin.open.api;
|
||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaAuditMediaUploadResult;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.open.bean.ma.WxMaOpenCommitExtInfo;
|
||||
import me.chanjar.weixin.open.bean.ma.WxMaScheme;
|
||||
import me.chanjar.weixin.open.bean.message.WxOpenMaSubmitAuditMessage;
|
||||
import me.chanjar.weixin.open.bean.result.*;
|
||||
@@ -379,14 +378,18 @@ public interface WxOpenMaService extends WxMaService {
|
||||
/**
|
||||
* 1、为授权的小程序帐号上传小程序代码
|
||||
*
|
||||
* @param templateId 代码模板ID
|
||||
* @param userVersion 用户定义版本
|
||||
* @param userDesc 用户定义版本描述
|
||||
* @param extInfo 第三方自定义的配置
|
||||
* @param templateId 代码模板ID
|
||||
* @param userVersion 用户定义版本
|
||||
* @param userDesc 用户定义版本描述
|
||||
* @param extJsonObject 为了方便第三方平台的开发者引入 extAppid 的开发调试工作,引入ext.json配置文件概念,该参数则是用于控制ext.json配置文件的内容。
|
||||
* 如果是普通模板可以使用 WxMaOpenCommitExtInfo 类构造参数,
|
||||
* 如果是标准模板可支持的参数为:{"extAppid":'', "ext": {}, "window": {}} 所以可以使用 WxMaOpenCommitStandardExt 构造参数
|
||||
* @return the wx open result
|
||||
* @throws WxErrorException the wx error exception
|
||||
* @see me.chanjar.weixin.open.bean.ma.WxMaOpenCommitStandardExt
|
||||
* @see me.chanjar.weixin.open.bean.ma.WxMaOpenCommitExtInfo
|
||||
*/
|
||||
WxOpenResult codeCommit(Long templateId, String userVersion, String userDesc, WxMaOpenCommitExtInfo extInfo) throws WxErrorException;
|
||||
WxOpenResult codeCommit(Long templateId, String userVersion, String userDesc, Object extJsonObject) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 获取体验小程序的体验二维码
|
||||
@@ -617,6 +620,7 @@ public interface WxOpenMaService extends WxMaService {
|
||||
|
||||
/**
|
||||
* 为小程序开通小商店组件
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
WxOpenResult registerShopComponent() throws WxErrorException;
|
||||
@@ -630,6 +634,7 @@ public interface WxOpenMaService extends WxMaService {
|
||||
|
||||
/**
|
||||
* 小程序审核 提审素材上传接口
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
WxMaAuditMediaUploadResult uploadMedia(File file) throws WxErrorException;
|
||||
|
||||
@@ -16,7 +16,6 @@ import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.open.api.WxOpenComponentService;
|
||||
import me.chanjar.weixin.open.api.WxOpenMaBasicService;
|
||||
import me.chanjar.weixin.open.api.WxOpenMaService;
|
||||
import me.chanjar.weixin.open.bean.ma.WxMaOpenCommitExtInfo;
|
||||
import me.chanjar.weixin.open.bean.ma.WxMaQrcodeParam;
|
||||
import me.chanjar.weixin.open.bean.ma.WxMaScheme;
|
||||
import me.chanjar.weixin.open.bean.message.WxOpenMaSubmitAuditMessage;
|
||||
@@ -185,13 +184,13 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxOpenResult codeCommit(Long templateId, String userVersion, String userDesc, WxMaOpenCommitExtInfo extInfo) throws WxErrorException {
|
||||
public WxOpenResult codeCommit(Long templateId, String userVersion, String userDesc, Object extJsonObject) throws WxErrorException {
|
||||
JsonObject params = new JsonObject();
|
||||
params.addProperty("template_id", templateId);
|
||||
params.addProperty("user_version", userVersion);
|
||||
params.addProperty("user_desc", userDesc);
|
||||
//注意:ext_json必须是字符串类型
|
||||
params.addProperty("ext_json", GSON.toJson(extInfo));
|
||||
params.addProperty("ext_json", GSON.toJson(extJsonObject));
|
||||
String response = post(API_CODE_COMMIT, GSON.toJson(params));
|
||||
return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user