Skip to content

Commit 55ce138

Browse files
committed
#1110 微信营销回传数据接口新增leads_type参数
1 parent 48742dd commit 55ce138

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpMarketingService.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ public interface WxMpMarketingService {
6161
* @param endDate 结束日期
6262
* @param filtering 过滤条件
6363
* @param page 页码,获取指定页数据
64-
* @param page_size 一页获取的数据条数(1-100)
64+
* @param pageSize 一页获取的数据条数(1-100)
65+
* @return .
66+
* @throws WxErrorException .
67+
* @throws IOException .
6568
*/
66-
WxMpAdLeadResult getAdLeads(Date beginDate, Date endDate, List<WxMpAdLeadFilter> filtering, Integer page, Integer page_size) throws WxErrorException, IOException;
69+
WxMpAdLeadResult getAdLeads(Date beginDate, Date endDate, List<WxMpAdLeadFilter> filtering, Integer page, Integer pageSize)
70+
throws WxErrorException, IOException;
6771
}

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpMarketingServiceImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ public void addUserAction(List<WxMpUserAction> actions) throws WxErrorException
5454
}
5555

5656
@Override
57-
public WxMpAdLeadResult getAdLeads(Date beginDate, Date endDate, List<WxMpAdLeadFilter> filtering, Integer page, Integer pageSize) throws WxErrorException, IOException {
57+
public WxMpAdLeadResult getAdLeads(Date beginDate, Date endDate, List<WxMpAdLeadFilter> filtering, Integer page, Integer pageSize)
58+
throws WxErrorException, IOException {
5859
Date today = new Date();
5960
if (beginDate == null) {
6061
beginDate = today;
@@ -68,7 +69,7 @@ public WxMpAdLeadResult getAdLeads(Date beginDate, Date endDate, List<WxMpAdLead
6869
dateRange.addProperty("end_date", DateFormatUtils.format(endDate, "yyyy-MM-dd"));
6970
params += "&date_range=" + URLEncoder.encode(dateRange.toString(), StandardCharsets.UTF_8.name());
7071
params += "&page=" + page;
71-
params += "&pageSize=" + pageSize;
72+
params += "&page_size=" + pageSize;
7273
if (filtering != null) {
7374
JsonArray filterJson = new JsonArray();
7475
for (WxMpAdLeadFilter filter : filtering) {

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/marketing/WxMpUserAction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class WxMpUserAction implements Serializable {
2525
private String url;
2626
private Integer actionTime;
2727
private String actionType;
28+
private String leadsType;
2829
private String clickId;
2930
private Integer actionParam;
3031

@@ -44,6 +45,7 @@ private JsonObject toJsonObject() {
4445
if (this.actionParam != null) {
4546
JsonObject actionParamJson = new JsonObject();
4647
actionParamJson.addProperty("value", actionParam);
48+
actionParamJson.addProperty("leads_type", leadsType);
4749
json.add("action_param", actionParamJson);
4850
}
4951

0 commit comments

Comments
 (0)