10000 :new: #2113 【公众号】增加对话能力(原导购)相关接口 · linlinjava/WxJava@7359abf · GitHub
[go: up one dir, main page]

Skip to content

Commit 7359abf

Browse files
authored
🆕 binarywang#2113 【公众号】增加对话能力(原导购)相关接口
1 parent a596228 commit 7359abf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3462
-27
lines changed
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
package me.chanjar.weixin.mp.api;
2+
3+
import me 8000 .chanjar.weixin.common.error.WxErrorException;
4+
import me.chanjar.weixin.mp.bean.guide.*;
5+
6+
import java.util.List;
7+
8+
/**
9+
* @author <a href="https://www.sacoc.cn">广州跨界-宋心成</a>
10+
* @date 2021/5/13/013
11+
*/
12+
public interface WxMpGuideBuyerService {
13+
/**
14+
* 为顾问分配客户(批量)
15+
*
16+
* <pre>
17+
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/addguidebuyerrelation?access_token=ACCESS_TOKEN
18+
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.addGuideBuyerRelation.html
19+
* </pre>
20+
*
21+
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
22+
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
23+
* @param infos 客户列表
24+
* @return 客户列表添加结果
25+
* @throws WxErrorException .
26+
*/
27+
List<WxMpGuideBuyerResp> addGuideBuyerRelation(String account, String openid, List<WxMpAddGuideBuyerInfo> infos) throws WxErrorException;
28+
29+
/**
30+
* 为顾问分配客户(单个)
31+
*
32+
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
33+
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
34+
* @param userOpenid 用户openid
35+
* @param nickname 用户昵称
36+
* @throws WxErrorException .
37+
*/
38+
void addGuideBuyerRelation(String account, String openid, String userOpenid, String nickname) throws WxErrorException;
39+
40+
/**
41+
* 为顾问移除客户(批量)
42+
*
43+
* <pre>
44+
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/delguidebuyerrelation?access_token=ACCESS_TOKEN
45+
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.delGuideBuyerRelation.html
46+
* </pre>
47+
*
48+
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
49+
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
50+
* @param buyerOpenIds 客户openid列表,不超过200
51+
* @return 客户列表移除结果
52+
*/
53+
List<WxMpGuideBuyerResp> delGuideBuyerRelation(String account, String openid, List<String> buyerOpenIds) throws WxErrorException;
54+
55+
/**
56+
* 为顾问移除客户(单个)
57+
*
58+
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
59+
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
60+
* @param userOpenid 用户openid
61+
* @throws WxErrorException .
62+
*/
63+
void delGuideBuyerRelation(String account, String openid, String userOpenid) throws WxErrorException;
64+
65+
/**
66+
* 获取顾问的客户列表
67+
*
68+
* <pre>
69+
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/getguidebuyerrelationlist?access_token=ACCESS_TOKEN
70+
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.getGuideBuyerRelationList.html
71+ * </pre>
72+
*
73+
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
74+
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
75+
* @param page 分页页数,从0开始,用于组内顾问分页获取
76+
* @param num 每页数量
77+
* @return 顾问的客户列表
78+
* @throws WxErrorException .
79+
*/
80+
WxMpGuideBuyerInfoList getGuideBuyerRelationList(String account, String openid, int page, int num) throws WxErrorException;
81+
82+
/**
83+
* 为客户更换顾问(批量)
84+
*
85+
* <pre>
86+
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/rebindguideacctforbuyer?access_token=ACCESS_TOKEN
87+
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.rebindGuideAcctForBuyer.html
88+
* </pre>
89+
*
90+
* @param oldAccount 原顾问微信号(old_guide_account和new_guide_account配套使用)
91+
* @param oldOpenid 原顾问openid或者unionid(old_guide_openid和new_guide_openid配套使用)
92+
* @param account 新顾问微信号(new_guide_account和new_guide_openid二选一)
93+
* @param openid 新顾问openid或者unionid(new_guide_account和new_guide_openid二选一)
94+
* @param buyerOpenIds 客户列表,不超过200
95+
* @return 客户列表换绑结果
96+
* @throws WxErrorException .
97+
*/
98+
List<WxMpGuideBuyerResp> rebindGuideAcctForBuyer(String oldAccount, String oldOpenid, String account, String openid, List<String> buyerOpenIds) throws WxErrorException;
99+
100+
/**
101+
* 为客户更换顾问(单个)
102+
*
103+
* @param oldAccount 原顾问微信号(old_guide_account和new_guide_account配套使用)
104+
* @param oldOpenid 原顾问openid或者unionid(old_guide_openid和new_guide_openid配套使用)
105+
* @param account 新顾问微信号(new_guide_account和new_guide_openid二选一)
106+
* @param openid 新顾问openid或者unionid(new_guide_account和new_guide_openid二选一)
107+
* @param userOpenid 用户openid
108+
* @throws WxErrorException 。
109+
*/
110+
void rebindGuideAcctForBuyer(String oldAccount, String oldOpenid, String account, String openid, String userOpenid) throws WxErrorException;
111+
112+
/**
113+
* 修改客户昵称
114+
*
115+
* <pre>
116+
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/updateguidebuyerrelation?access_token=ACCESS_TOKEN
117+
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.updateGuideBuyerRelation.html
118+
* </pre>
119+
*
120+
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
121+
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
122+
* @param userOpenid 客户openid
123+
* @param nickname 客户昵称
124+
* @throws WxErrorException .
125+
*/
126+
void updateGuideBuyerRelation(String account, String openid, String userOpenid, String nickname) throws WxErrorException;
127+
128+
/**
129+
* 查询客户所属顾问
130+
*
131+
* <pre>
132+
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/getguidebuyerrelationbybuyer?access_token=ACCESS_TOKEN
133+
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.getGuideBuyerRelationByBuyer.html
134+
* </pre>
135+
*
136+
* @param openid 客户openid
137+
* @return 客户顾问关系信息
138+
* @throws WxErrorException .
139+
*/
140+
WxMpGuideBuyerRelation getGuideBuyerRelationByBuyer(String openid) throws WxErrorException;
141+
142+
/**
143+
* 查询指定顾问和客户的关系
144+
*
145+
* <pre>
146+
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/getguidebuyerrelation?access_token=ACCESS_TOKEN
147+
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.getGuideBuyerRelation.html
148+
* </pre>
149+
*
150+
* @param account 顾问微信号(guide_account和guide_openid二选一,若同时请求,默认为guide_account)
151+
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
152+
* @param userOpenid 客户openid
153+
* @return 客户信息
154+
* @throws WxErrorException .
155+
*/
156+
WxMpGuideBuyerInfo getGuideBuyerRelation(String account, String openid, String userOpenid) throws WxErrorException;
157+
}
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
package me.chanjar.weixin.mp.api;
2+
3+
import me.chanjar.weixin.common.error.WxErrorException;
4+
import me.chanjar.weixin.mp.bean.guide.WxMpGuideMassed;
5+
import me.chanjar.weixin.mp.bean.guide.WxMpGuideMassedInfo;
6+
import me.chanjar.weixin.mp.bean.guide.WxMpGuideMaterialInfo;
7+
8+
import java.util.List;
9+
10+
/**
11+
* @author <a href="https://www.sacoc.cn">广州跨界-宋心成</a>
12+
* @date 2021/5/13/013
13+
*/
14+
public interface WxMpGuideMassedJobService {
15+
16+
/**
17+
* 添加群发任务
18+
*
19+
* <pre>
20+
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/addguidemassendjob?access_token=ACCESS_TOKEN
21+
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/task-account/shopping-guide.addGuideMassendJob.html
22+
* </pre>
23+
*
24+
* @param account 顾问微信号(guide_account和guide_openid二选一)
25+
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
26+
* @param taskName 群发任务名称,不超过16字
27+
* @param taskRemark 群发任务备注,不超过100字
28+
* @param pushTime 任务下发给顾问的时间, 秒级时间戳, 范围为当前时间开始到最近一个月内
29+
* @param userOpenIds 客户openid列表
30+
* @param materialInfos 不超过3个素材
31+
* @return 群发任务id与客户openid列表
32+
* @throws WxErrorException 。
33+
*/
34+
WxMpGuideMassed addGuideMassedJob(String account, String openid, String taskName, String taskRemark, Long pushTime, List<String> userOpenIds, List<WxMpGuideMaterialInfo> materialInfos) throws WxErrorException;
35+
36+
/**
37+
* 获取群发任务列表
38+
*
39+
* <pre>
40+
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/getguidemassendjoblist?access_token=ACCESS_TOKEN
41+
* 文档地址:https://developers.weixin.qq.com/doc/of 93D9 fiaccount/Shopping_Guide/task-account/shopping-guide.getGuideMassendJobList.html
42+
* </pre>
43+
*
44+
* @param account 顾问微信号(guide_account和guide_openid二选一)
45+
* @param openid 顾问openid或者unionid(guide_account和guide_openid二选一)
46+
* @param taskStatus 获取指定状态的任务(为空则表示拉取所有状态的任务)
47+
* @param offset 偏移位置(从什么位置开始拉取)
48+
* @param limit 条数(默认50)
49+
* @return 群发任务列表
50+
* @throws WxErrorException 。
51+
*/
52+
List<WxMpGuideMassedInfo> getGuideMassedJobList(String account, String openid, List<Integer> taskStatus, Integer offset, Integer limit) throws WxErrorException;
53+
54+
/**
55+
* 获取指定群发任务信息
56+
*
57+
* <pre>
58+
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/getguidemassendjob?access_token=ACCESS_TOKEN
59+
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/task-account/shopping-guide.getGuideMassendJob.html
60+
* </pre>
61+
*
62+
* @param taskId 任务ID
63+
* @return 群发任务信息
64+
* @throws WxErrorException 。
65+
*/
66+
WxMpGuideMassedInfo getGuideMassedJob(String taskId) throws WxErrorException;
67< 77EF /td>+
68+
/**
69+
* 修改群发任务
70+
* 无法修改已经执行的任务,返回参数错误
71+
*
72+
* <pre>
73+
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/updateguidemassendjob?access_token=ACCESS_TOKEN
74+
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/task-account/shopping-guide.updateGuideMassendJob.html
75+
* </pre>
76+
*
77+
* @param taskId 任务ID
78+
* @param taskName 群发任务名称,不超过16字
79+
* @param taskRemark 群发任务备注,不超过100字
80+
* @param pushTime 下发时间, 秒级时间戳, 范围为当前时间开始到最近一个月内
81+
* @param userOpenIds 客户openid列表
82+
* @param materialInfos 不超过3个素材
83+
* @throws WxErrorException 。
84+
*/
85+
void updateGuideMassedJob(String taskId, String taskName, String taskRemark, Long pushTime, List<String> userOpenIds, List<WxMpGuideMaterialInfo> materialInfos) throws WxErrorException;
86+
87+
/**
88+
* 取消群发任务
89+
* 取消给顾问分配的群发任务, 已执行的任务无法取消。
90+
*
91+
* <pre>
92+
* 请求地址: POST https://api.weixin.qq.com/cgi-bin/guide/cancelguidemassendjob?access_token=ACCESS_TOKEN
93+
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/task-account/shopping-guide.cancelGuideMassendJob.html
94+
* </pre>
95+
*
96+
* @param taskId 任务ID
97+
* @throws WxErrorException .
98+
*/
99+
void cancelGuideMassedJob(String taskId) throws WxErrorException;
100+
}

0 commit comments

Comments
 (0)
0