| | |
| | | */ |
| | | public static final String GROUP_SENT_EMAIL = "https://qyapi.weixin.qq.com/cgi-bin/exmail/app/compose_send?access_token="; |
| | | |
| | | /** |
| | | * 客户群「加入群聊」查看 |
| | | */ |
| | | public static final String GROUP_JOIN_WAY_SEE = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/get_join_way?access_token="; |
| | | /** |
| | | * 客户群「加入群聊」新增 |
| | | * 企业可调用此接口来生成并配置「加入群聊」的二维码或者小程序按钮 |
| | | * 客户通过扫描二维码或点击小程序上的按钮,即可加入特定的客户群 |
| | | */ |
| | | public static final String GROUP_JOIN_WAY_ADD = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/add_join_way?access_token="; |
| | | /** |
| | | * 客户群「加入群聊」修改 |
| | | */ |
| | | public static final String GROUP_JOIN_WAY_EDIT = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/update_join_way?access_token="; |
| | | /** |
| | | * 客户群「加入群聊」删除 |
| | | */ |
| | | public static final String GROUP_JOIN_WAY_EDL= "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/del_join_way?access_token="; |
| | | |
| | | |
| | | /** |
| | |
| | | public static JSONObject sentEmail(String accessToken, JSONObject bodyData) { |
| | | return HttpURLUtil(GROUP_SENT_EMAIL + accessToken, bodyData.toString()); |
| | | } |
| | | |
| | | /** |
| | | * 客户群「加入群聊」查看详情 |
| | | * @param config_id 联系方式配置ID |
| | | * */ |
| | | public static HttpHzResponse groupJoinSee(String accessToken, String config_id) { |
| | | JSONObject bodyData = new JSONObject(); |
| | | bodyData.put("config_id", config_id); |
| | | return HttpHzUtil.HttpURLUtilJson(GROUP_JOIN_WAY_SEE + accessToken, bodyData.toString(), null, null, "POST", null); |
| | | } |
| | | |
| | | /** |
| | | * 客户群「加入群聊」新增 |
| | | * @param scene 场景。1 - 群的小程序插件, 2 - 群的二维码插件 |
| | | * @param remark 联系方式的备注信息,用于助记,超过30个字符将被截断 |
| | | * @param auto_create_room 当群满了后,是否自动新建群。0-否;1-是。 默认为1 |
| | | * @param room_base_name 自动建群的群名前缀,当auto_create_room为1时有效。最长40个utf8字符 |
| | | * @param room_base_id 自动建群的群起始序号,当auto_create_room为1时有效 |
| | | * @param chat_id_list 使用该配置的客户群ID列表,最多支持5个 |
| | | * */ |
| | | public static HttpHzResponse groupJoinAdd(String accessToken, Integer scene, String remark |
| | | ,Integer auto_create_room,String room_base_name,String room_base_id,List<String> chat_id_list,String state) { |
| | | JSONObject bodyData = new JSONObject(); |
| | | bodyData.put("scene", scene); |
| | | bodyData.put("remark", remark); |
| | | bodyData.put("auto_create_room", auto_create_room); |
| | | bodyData.put("room_base_name", room_base_name); |
| | | bodyData.put("room_base_id", room_base_id); |
| | | bodyData.put("chat_id_list", chat_id_list); |
| | | bodyData.put("state", state); |
| | | return HttpHzUtil.HttpURLUtilJson(GROUP_JOIN_WAY_ADD + accessToken, bodyData.toString(), null, null, "POST", null); |
| | | } |
| | | |
| | | /** |
| | | * 客户群「加入群聊」修改 |
| | | * @param config_id 联系方式配置ID |
| | | * @param scene 场景。1 - 群的小程序插件, 2 - 群的二维码插件 |
| | | * @param remark 联系方式的备注信息,用于助记,超过30个字符将被截断 |
| | | * @param auto_create_room 当群满了后,是否自动新建群。0-否;1-是。 默认为1 |
| | | * @param room_base_name 自动建群的群名前缀,当auto_create_room为1时有效。最长40个utf8字符 |
| | | * @param room_base_id 自动建群的群起始序号,当auto_create_room为1时有效 |
| | | * @param chat_id_list 使用该配置的客户群ID列表,最多支持5个 |
| | | * */ |
| | | public static HttpHzResponse groupJoinEdit(String accessToken,String config_id, Integer scene, String remark |
| | | ,Integer auto_create_room,String room_base_name,String room_base_id,List<String> chat_id_list,String state) { |
| | | JSONObject bodyData = new JSONObject(); |
| | | bodyData.put("config_id", config_id); |
| | | bodyData.put("scene", scene); |
| | | bodyData.put("remark", remark); |
| | | bodyData.put("auto_create_room", auto_create_room); |
| | | bodyData.put("room_base_name", room_base_name); |
| | | bodyData.put("room_base_id", room_base_id); |
| | | bodyData.put("chat_id_list", chat_id_list); |
| | | bodyData.put("state", state); |
| | | return HttpHzUtil.HttpURLUtilJson(GROUP_JOIN_WAY_EDIT + accessToken, bodyData.toString(), null, null, "POST", null); |
| | | } |
| | | |
| | | /** |
| | | * 客户群「加入群聊」删除 |
| | | * @param config_id 联系方式配置ID |
| | | * */ |
| | | public static HttpHzResponse groupJoinDel(String accessToken, String config_id) { |
| | | JSONObject bodyData = new JSONObject(); |
| | | bodyData.put("config_id", config_id); |
| | | return HttpHzUtil.HttpURLUtilJson(GROUP_JOIN_WAY_EDL + accessToken, bodyData.toString(), null, null, "POST", null); |
| | | } |
| | | |
| | | |
| | | |
| | | } |