From f610e6e7b7451efcbccefba881c5128973dcc94c Mon Sep 17 00:00:00 2001
From: fwq <582742538@qq.com>
Date: 星期一, 11 十二月 2023 10:41:37 +0800
Subject: [PATCH] 时间工具类优化

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

diff --git a/src/main/java/com/hx/mp/util/CorpMpClientUtil.java b/src/main/java/com/hx/mp/util/CorpMpClientUtil.java
index 5e89e85..98c888b 100644
--- a/src/main/java/com/hx/mp/util/CorpMpClientUtil.java
+++ b/src/main/java/com/hx/mp/util/CorpMpClientUtil.java
@@ -78,6 +78,24 @@
      */
     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=";
 
 
     /**
@@ -420,4 +438,73 @@
     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