Commit d993640 1 parent 9f21f59 commit d993640 Copy full SHA for d993640
File tree 3 files changed +44
-9
lines changed
weixin-java-channel/src/main/java/me/chanjar/weixin/channel
3 files changed +44
-9
lines changed Original file line number Diff line number Diff line change 7
7
import static me .chanjar .weixin .channel .constant .WxChannelApiUrlConstants .Share .SEARCH_SHARER_URL ;
8
8
import static me .chanjar .weixin .channel .constant .WxChannelApiUrlConstants .Share .UNBIND_SHARER_URL ;
9
9
10
+ import com .google .gson .JsonObject ;
10
11
import java .util .List ;
11
12
import lombok .extern .slf4j .Slf4j ;
12
13
import me .chanjar .weixin .channel .api .WxChannelSharerService ;
21
22
import me .chanjar .weixin .channel .bean .sharer .SharerUnbindResponse ;
22
23
import me .chanjar .weixin .channel .util .ResponseUtils ;
23
24
import me .chanjar .weixin .common .error .WxErrorException ;
25
+ import me .chanjar .weixin .common .util .json .GsonHelper ;
24
26
25
27
/**
26
28
* 视频号小店 分享员服务实现
@@ -39,8 +41,9 @@ public WxChannelSharerServiceImpl(BaseWxChannelServiceImpl shopService) {
39
41
40
42
@ Override
41
43
public SharerBindResponse bindSharer (String username ) throws WxErrorException {
42
- String reqJson = "{\" username\" : " + username + "}" ;
43
- String resJson = shopService .post (BIND_SHARER_URL , reqJson );
44
+ JsonObject jsonObject = GsonHelper .buildJsonObject ("username" , username );
45
+
46
+ String resJson = shopService .post (BIND_SHARER_URL , jsonObject );
44
47
return ResponseUtils .decode (resJson , SharerBindResponse .class );
45
48
}
46
49
Original file line number Diff line number Diff line change 15
15
public class SharerOrder implements Serializable {
16
16
17
17
private static final long serialVersionUID = 1528673402572025670L ;
18
- /** 订单号 */
18
+ /**
19
+ * 订单号
20
+ */
19
21
@ JsonProperty ("order_id" )
20
22
private String orderId ;
21
23
22
- /** 分享场景 {@link me.chanjar.weixin.channel.enums.ShareScene} */
23
- @ JsonProperty ("sharer_scene" )
24
+ /**
25
+ * 分享场景 {@link me.chanjar.weixin.channel.enums.ShareScene}
26
+ */
27
+ @ JsonProperty ("share_scene" )
24
28
private Integer sharerScene ;
25
29
26
- /** 分享员openid */
30
+ /**
31
+ * 分享员openid
32
+ */
27
33
@ JsonProperty ("sharer_openid" )
28
34
private String sharerOpenid ;
29
35
30
- /** 分享员类型 {@link me.chanjar.weixin.channel.enums.SharerType} */
36
+ /**
37
+ * 分享员类型 {@link me.chanjar.weixin.channel.enums.SharerType}
38
+ */
31
39
@ JsonProperty ("sharer_type" )
32
40
private Integer sharerType ;
33
41
34
- /** 视频号场景信息 */
42
+ /**
43
+ * 商品sku_id
44
+ */
45
+ @ JsonProperty ("sku_id" )
46
+ private String skuId ;
47
+
48
+
49
+ /**
50
+ * 商品唯一id
51
+ */
52
+ @ JsonProperty ("product_id" )
53
+ private String productId ;
54
+
55
+
56
+ /**
57
+ * 是否从企微分享
58
+ */
59
+ @ JsonProperty ("from_wecom" )
60
+ private Boolean fromWxWork ;
61
+
62
+
63
+ /**
64
+ * 视频号场景信息
65
+ */
35
66
@ JsonProperty ("finder_scene_info" )
36
67
private FinderSceneInfo sceneInfo ;
37
68
69
+
38
70
}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public class SharerOrderParam extends PageParam {
20
20
private static final long serialVersionUID = 5240085870008898601L ;
21
21
/** 分享员openid */
22
22
@ JsonProperty ("openid" )
23
- private Integer openid ;
23
+ private String openid ;
24
24
25
25
/** 分享场景 */
26
26
@ JsonProperty ("share_scene" )
You can’t perform that action at this time.
0 commit comments