|
| 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 | +} |
0 commit comments