Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改卡券接口和字段 #1496

Merged
merged 6 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ private WxMpCardCreateResult validCheck(WxMpMemberCardCreateMessage createMessag
dateInfoType.getDescription()));
}

if (!baseInfo.isUseAllLocations() && StringUtils.isBlank(baseInfo.getLocationIdList())) {
if (!baseInfo.isUseAllLocations() && baseInfo.getLocationIdList().isEmpty()) {
return WxMpCardCreateResult.failure("会员卡基本信息的门店使用范围选择指定门店,门店列表:locationIdList不能为空");
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package me.chanjar.weixin.mp.bean.card;

import java.io.Serializable;
import java.util.List;

import com.google.gson.annotations.SerializedName;
import lombok.Data;
Expand Down Expand Up @@ -104,7 +105,7 @@ public class BaseInfo implements Serializable {
* 门店位置ID,调用 POI门店管理接口 获取门店位置ID.
*/
@SerializedName("location_id_list")
private String locationIdList;
private List<String> locationIdList;

/**
* 会员卡是否支持全部门店,填写后商户门店更新时会自动同步至卡券.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;

import java.io.Serializable;
import java.util.List;

/**
* 微信会员卡基本信息更新
Expand Down Expand Up @@ -54,7 +55,7 @@ public class BaseInfoUpdate implements Serializable {
* 门店位置ID,调用 POI门店管理接口 获取门店位置ID.
*/
@SerializedName("location_id_list")
private String locationIdList;
private List<String> locationIdList;

/**
* 会员卡是否支持全部门店,填写后商户门店更新时会自动同步至卡券.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ public enum CardWechatFieldType {
USER_FORM_INFO_FLAG_IDCARD("身份证"),
USER_FORM_INFO_FLAG_EMAIL("邮箱"),
USER_FORM_INFO_FLAG_LOCATION("详细地址"),
USER_FORM_INFO_FLAG_EDUCATION_BACKGRO("教育背景"),

/**
* 原文档为 USER_FORM_INFO_FLAG_EDUCATION_BACKGRO, 测试不通过,可能是文档错误
*/
USER_FORM_INFO_FLAG_EDUCATION_BACKGROUND("教育背景"),
USER_FORM_INFO_FLAG_INDUSTRY("行业"),
USER_FORM_INFO_FLAG_INCOME("收入"),
USER_FORM_INFO_FLAG_HABIT("兴趣爱好");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ public class WxDataCubeArticleResult extends WxDataCubeBaseResult {

/**
* user_source
* 在获取图文阅读分时数据时才有该字段,代表用户从哪里进入来阅读该图文。0:会话;1.好友;2.朋友圈;3.腾讯微博;4.历史消息页;5.其他
* 在获取图文统计数据、图文阅读分时数据时才有该字段,代表用户从哪里进入来阅读该图文。
* 99999999.全部;0:会话;1.好友;2.朋友圈;3.腾讯微博;4.历史消息页;5.其他;6.看一看;7.搜一搜;
*/
@SerializedName("user_source")
private Integer userSource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.chanjar.weixin.mp.api.impl;

import com.google.common.collect.Lists;
import com.google.inject.Inject;
import me.chanjar.weixin.common.bean.WxCardApiSignature;
import me.chanjar.weixin.common.error.WxErrorException;
Expand Down Expand Up @@ -134,7 +135,7 @@ public void testCreateGrouponCard() throws WxErrorException {
base.setCustomUrlSubTitle("副标题tip");
base.setPromotionUrlName("更多优惠");
base.setPromotionUrl("http://www.qq.com");
base.setLocationIdList("1234");
base.setLocationIdList(Lists.newArrayList("1234"));

//团购券
WxMpCardCreateRequest grouponMessage = new WxMpCardCreateRequest();
Expand Down