From a538020ae3d1af171816187a16ebb0072ea68892 Mon Sep 17 00:00:00 2001
From: Andru <769883346@qq.com>
Date: 星期五, 03 十一月 2023 18:31:11 +0800
Subject: [PATCH] 添加企业微信发送邮件方法

---
 src/main/java/com/hx/mp/util/CorpMpClientUtil.java |   15 ++++++++++++++-
 1 files changed, 14 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..5e89e85 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,12 @@
      * 閫氳繃瀹㈡埛缇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=";
+
 
 
     /**
@@ -407,4 +412,12 @@
         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());
+    }
 }

--
Gitblit v1.8.0