Skip to content

修复视频号小店分享员订单参数: openid 的数据类型 #3167

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

Merged
merged 4 commits into from
Nov 16, 2023
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 @@ -7,6 +7,7 @@
import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Share.SEARCH_SHARER_URL;
import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Share.UNBIND_SHARER_URL;

import com.google.gson.JsonObject;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.channel.api.WxChannelSharerService;
Expand All @@ -21,6 +22,7 @@
import me.chanjar.weixin.channel.bean.sharer.SharerUnbindResponse;
import me.chanjar.weixin.channel.util.ResponseUtils;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.common.util.json.GsonHelper;

/**
* 视频号小店 分享员服务实现
Expand All @@ -39,8 +41,9 @@ public WxChannelSharerServiceImpl(BaseWxChannelServiceImpl shopService) {

@Override
public SharerBindResponse bindSharer(String username) throws WxErrorException {
String reqJson = "{\"username\": " + username + "}";
String resJson = shopService.post(BIND_SHARER_URL, reqJson);
JsonObject jsonObject = GsonHelper.buildJsonObject("username", username);

String resJson = shopService.post(BIND_SHARER_URL, jsonObject);
return ResponseUtils.decode(resJson, SharerBindResponse.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,56 @@
public class SharerOrder implements Serializable {

private static final long serialVersionUID = 1528673402572025670L;
/** 订单号 */
/**
* 订单号
*/
@JsonProperty("order_id")
private String orderId;

/** 分享场景 {@link me.chanjar.weixin.channel.enums.ShareScene} */
@JsonProperty("sharer_scene")
/**
* 分享场景 {@link me.chanjar.weixin.channel.enums.ShareScene}
*/
@JsonProperty("share_scene")
private Integer sharerScene;

/** 分享员openid */
/**
* 分享员openid
*/
@JsonProperty("sharer_openid")
private String sharerOpenid;

/** 分享员类型 {@link me.chanjar.weixin.channel.enums.SharerType} */
/**
* 分享员类型 {@link me.chanjar.weixin.channel.enums.SharerType}
*/
@JsonProperty("sharer_type")
private Integer sharerType;

/** 视频号场景信息 */
/**
* 商品sku_id
*/
@JsonProperty("sku_id")
private String skuId;


/**
* 商品唯一id
*/
@JsonProperty("product_id")
private String productId;


/**
* 是否从企微分享
*/
@JsonProperty("from_wecom")
private Boolean fromWxWork;


/**
* 视频号场景信息
*/
@JsonProperty("finder_scene_info")
private FinderSceneInfo sceneInfo;


}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class SharerOrderParam extends PageParam {
private static final long serialVersionUID = 5240085870008898601L;
/** 分享员openid */
@JsonProperty("openid")
private Integer openid;
private String openid;

/** 分享场景 */
@JsonProperty("share_scene")
Expand Down