#534 针对公众号发送模版消息中的小程序path和pagepath问题增加可选参数,如果想让请求使用path作为参数名,设置usePath属性为true即可,否则会使用pagepath。

This commit is contained in:
Binary Wang
2018-08-08 21:33:01 +08:00
parent a24b74603f
commit ebf9baac27
6 changed files with 37 additions and 13 deletions

View File

@@ -1,14 +1,13 @@
package me.chanjar.weixin.mp.bean.subscribe;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.io.Serializable;
/**
* @author Mklaus
* @date 2018-01-22 下午12:18
@@ -78,5 +77,11 @@ public class WxMpSubscribeMessage {
private String appid;
private String pagePath;
/**
* 是否使用path否则使用pagepath.
* 加入此字段是基于微信官方接口变化多端的考虑
*/
private boolean usePath = false;
}
}

View File

@@ -77,6 +77,12 @@ public class WxMpTemplateMessage implements Serializable {
private String appid;
private String pagePath;
/**
* 是否使用path否则使用pagepath.
* 加入此字段是基于微信官方接口变化多端的考虑
*/
private boolean usePath = true;
}
}