mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-05 17:38:05 +08:00
🎨 #3167 【视频号】视频号小店分享员订单接口增加几个返回参数,并修复openid参数类型
This commit is contained in:
parent
9f21f59d75
commit
d99364049d
@ -7,6 +7,7 @@ import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Share.
|
||||
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;
|
||||
@ -21,6 +22,7 @@ import me.chanjar.weixin.channel.bean.sharer.SharerUnbindParam;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 视频号小店 分享员服务实现
|
||||
@ -39,8 +41,9 @@ public class WxChannelSharerServiceImpl implements WxChannelSharerService {
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
|
@ -15,24 +15,56 @@ import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user