forked from binarywang/WxJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWxMpGuideBuyerService.java
More file actions
157 lines (145 loc) · 7.28 KB
/
WxMpGuideBuyerService.java
File metadata and controls
157 lines (145 loc) · 7.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
package me.chanjar.weixin.mp.api;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.mp.bean.guide.*;
import java.util.List;
/**
* @author <a href="https://www.sacoc.cn">广州跨界-宋心成</a>
* @date 2021/5/13/013
*/
public interface WxMpGuideBuyerService {
/**
* 为顾问分配客户(批量)
*
* <pre>
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/addguidebuyerrelation?access_token=ACCESS_TOKEN
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.addGuideBuyerRelation.html
* </pre>
*
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
* @param infos 客户列表
* @return 客户列表添加结果
* @throws WxErrorException .
*/
List<WxMpGuideBuyerResp> addGuideBuyerRelation(String account, String openid, List<WxMpAddGuideBuyerInfo> infos) throws WxErrorException;
/**
* 为顾问分配客户(单个)
*
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
* @param userOpenid 用户openid
* @param nickname 用户昵称
* @throws WxErrorException .
*/
void addGuideBuyerRelation(String account, String openid, String userOpenid, String nickname) throws WxErrorException;
/**
* 为顾问移除客户(批量)
*
* <pre>
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/delguidebuyerrelation?access_token=ACCESS_TOKEN
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.delGuideBuyerRelation.html
* </pre>
*
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
* @param buyerOpenIds 客户openid列表,不超过200
* @return 客户列表移除结果
*/
List<WxMpGuideBuyerResp> delGuideBuyerRelation(String account, String openid, List<String> buyerOpenIds) throws WxErrorException;
/**
* 为顾问移除客户(单个)
*
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
* @param userOpenid 用户openid
* @throws WxErrorException .
*/
void delGuideBuyerRelation(String account, String openid, String userOpenid) throws WxErrorException;
/**
* 获取顾问的客户列表
*
* <pre>
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/getguidebuyerrelationlist?access_token=ACCESS_TOKEN
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.getGuideBuyerRelationList.html
* </pre>
*
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
* @param page 分页页数,从0开始,用于组内顾问分页获取
* @param num 每页数量
* @return 顾问的客户列表
* @throws WxErrorException .
*/
WxMpGuideBuyerInfoList getGuideBuyerRelationList(String account, String openid, int page, int num) throws WxErrorException;
/**
* 为客户更换顾问(批量)
*
* <pre>
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/rebindguideacctforbuyer?access_token=ACCESS_TOKEN
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.rebindGuideAcctForBuyer.html
* </pre>
*
* @param oldAccount 原顾问微信号(old_guide_account和new_guide_account配套使用)
* @param oldOpenid 原顾问openid或者unionid(old_guide_openid和new_guide_openid配套使用)
* @param account 新顾问微信号(new_guide_account和new_guide_openid二选一)
* @param openid 新顾问openid或者unionid(new_guide_account和new_guide_openid二选一)
* @param buyerOpenIds 客户列表,不超过200
* @return 客户列表换绑结果
* @throws WxErrorException .
*/
List<WxMpGuideBuyerResp> rebindGuideAcctForBuyer(String oldAccount, String oldOpenid, String account, String openid, List<String> buyerOpenIds) throws WxErrorException;
/**
* 为客户更换顾问(单个)
*
* @param oldAccount 原顾问微信号(old_guide_account和new_guide_account配套使用)
* @param oldOpenid 原顾问openid或者unionid(old_guide_openid和new_guide_openid配套使用)
* @param account 新顾问微信号(new_guide_account和new_guide_openid二选一)
* @param openid 新顾问openid或者unionid(new_guide_account和new_guide_openid二选一)
* @param userOpenid 用户openid
* @throws WxErrorException 。
*/
void rebindGuideAcctForBuyer(String oldAccount, String oldOpenid, String account, String openid, String userOpenid) throws WxErrorException;
/**
* 修改客户昵称
*
* <pre>
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/updateguidebuyerrelation?access_token=ACCESS_TOKEN
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.updateGuideBuyerRelation.html
* </pre>
*
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
* @param userOpenid 客户openid
* @param nickname 客户昵称
* @throws WxErrorException .
*/
void updateGuideBuyerRelation(String account, String openid, String userOpenid, String nickname) throws WxErrorException;
/**
* 查询客户所属顾问
*
* <pre>
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/getguidebuyerrelationbybuyer?access_token=ACCESS_TOKEN
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.getGuideBuyerRelationByBuyer.html
* </pre>
*
* @param openid 客户openid
* @return 客户顾问关系信息
* @throws WxErrorException .
*/
WxMpGuideBuyerRelation getGuideBuyerRelationByBuyer(String openid) throws WxErrorException;
/**
* 查询指定顾问和客户的关系
*
* <pre>
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/getguidebuyerrelation?access_token=ACCESS_TOKEN
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.getGuideBuyerRelation.html
* </pre>
*
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
* @param userOpenid 客户openid
* @return 客户信息
* @throws WxErrorException .
*/
WxMpGuideBuyerInfo getGuideBuyerRelation(String account, String openid, String userOpenid) throws WxErrorException;
}