| | |
| | | */ |
| | | public static final String RELATION_TAG = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/mark_tag?access_token="; |
| | | |
| | | /** |
| | | * 获取员工客户列表url |
| | | */ |
| | | public static final String EXTERNAL_CONTACT_LIST = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/list"; |
| | | |
| | | /** |
| | | * 生成企业成员联系我的id-单人 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取客户列表 |
| | | * @param accessToken 企业的accessToken |
| | | * @param userId 企业成员的userId |
| | | * @return 返回 |
| | | */ |
| | | public static JSONObject getExternalContactList(String accessToken, String userId) { |
| | | return HttpURLUtil(EXTERNAL_CONTACT_LIST + "?access_token=" + accessToken + "&userid=" + userId, null); |
| | | } |
| | | |
| | | /** |
| | | * 获取企业客户详情信息 |
| | | * |
| | | * @param accessToken 企业的accessToken |
| | |
| | | * @return 返回 |
| | | */ |
| | | public static JSONObject getClientData(String accessToken, String externalUserId) { |
| | | |
| | | return HttpURLUtil(GET_CLIENT_DETAIL_URL + "?access_token=" + accessToken + "&external_userid=" + externalUserId, null); |
| | | } |
| | | |
| | |
| | | return HttpURLUtil(RELATION_TAG + accessToken, data.toString()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 请求http协议 获取信息工具 |
| | | **/ |
| | |
| | | * @param scene 场景,1-在小程序中联系,2-通过二维码联系 |
| | | * @param state 企业自定义的state参数,用于区分不同的添加渠道,在调用“获取外部联系人详情”时会返回该参数值,不超过30个字符 |
| | | * @param remark 联系方式的备注信息,用于助记,不超过30个字符 |
| | | * @return |
| | | * @return 返回 |
| | | */ |
| | | public static JSONObject createContactId(String accessToken,String userId,int scene,String state,String remark){ |
| | | |
| | | String configId = null; |
| | | JSONObject data = new JSONObject(); |
| | | data.put("type",1); |