From 32a1ddb924a5a58086255e082bdecb3ef65da41b Mon Sep 17 00:00:00 2001
From: fwq <582742538@qq.com>
Date: 星期三, 08 十一月 2023 11:03:00 +0800
Subject: [PATCH] 查看数据

---
 src/main/java/com/hx/mp/util/CorpMpClientUtil.java |  102 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 101 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/hx/mp/util/CorpMpClientUtil.java b/src/main/java/com/hx/mp/util/CorpMpClientUtil.java
index 87b0919..98c888b 100644
--- a/src/main/java/com/hx/mp/util/CorpMpClientUtil.java
+++ b/src/main/java/com/hx/mp/util/CorpMpClientUtil.java
@@ -1,6 +1,5 @@
 package com.hx.mp.util;
 
-import com.hx.exception.TipsException;
 import com.hx.util.StringUtils;
 import com.hz.util.http.HttpHzUtil;
 import com.hz.util.http.dto.HttpHzResponse;
@@ -73,6 +72,30 @@
      * 閫氳繃瀹㈡埛缇D锛岃幏鍙栬鎯呫�傚寘鎷兢鍚嶃�佺兢鎴愬憳鍒楄〃銆佺兢鎴愬憳鍏ョ兢鏃堕棿銆佸叆缇ゆ柟寮忋�傦紙瀹㈡埛缇ゆ槸鐢卞叿鏈夊鎴风兢浣跨敤鏉冮檺鐨勬垚鍛樺垱寤虹殑澶栭儴缇わ級
      */
     public static final String GROUP_CHAT_DETAIL = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/get?access_token=";
+
+    /**
+     * 浼佷笟寰俊鍙戦�佹櫘閫氶偖浠�
+     */
+    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=";
 
 
     /**
@@ -407,4 +430,81 @@
         return HttpHzUtil.HttpURLUtilJson(GROUP_CHAT_DETAIL + accessToken, bodyData.toString(), null, null, "GET", null);
     }
 
+    /**
+     * 浼佷笟寰俊鍙戦�佹櫘閫氶偖浠�
+     * 鎺ュ彛鍦板潃: https://developer.work.weixin.qq.com/document/path/97445
+     * @param bodyData  鍙傛暟
+     */
+    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涓猽tf8瀛楃
+     * @param room_base_id 鑷姩寤虹兢鐨勭兢璧峰搴忓彿锛屽綋auto_create_room涓�1鏃舵湁鏁�
+     * @param chat_id_list 浣跨敤璇ラ厤缃殑瀹㈡埛缇D鍒楄〃锛屾渶澶氭敮鎸�5涓�
+     * */
+    public static HttpHzResponse groupJoinAdd(String accessToken, Integer scene, String remark
+            ,Integer auto_create_room,String room_base_name,Integer 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涓猽tf8瀛楃
+     * @param room_base_id 鑷姩寤虹兢鐨勭兢璧峰搴忓彿锛屽綋auto_create_room涓�1鏃舵湁鏁�
+     * @param chat_id_list 浣跨敤璇ラ厤缃殑瀹㈡埛缇D鍒楄〃锛屾渶澶氭敮鎸�5涓�
+     * */
+    public static HttpHzResponse groupJoinEdit(String accessToken,String config_id, Integer scene, String remark
+            ,Integer auto_create_room,String room_base_name,Integer 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);
+    }
+
+
+
 }

--
Gitblit v1.8.0