From 1a054c486c9037b7cb0bca5c4472c628d1d1c36c Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期一, 28 六月 2021 16:54:06 +0800
Subject: [PATCH] 解决代码被合并后删除问题

---
 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java
index c44a45b..320cb9b 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java
@@ -1,7 +1,17 @@
 package com.panzhihua.common.utlis;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileItemFactory;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.http.entity.ContentType;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.commons.CommonsMultipartFile;
 
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -34,4 +44,16 @@
         String content = JSON.toJSONString(map);
         return HttpClientUtil.httpPost(kf_url+"?access_token="+access_token,content);
     }
+
+    public static String sendKfImagesMessage(String openid,String access_token,String mediaId)throws Exception{
+        Map<String,Object> map_content = new HashMap<>();
+        map_content.put("media_id",mediaId);
+        Map<String,Object> map = new HashMap<>();
+        map.put("touser",openid);
+        map.put("msgtype","image");
+        map.put("image",map_content);
+        String content = JSON.toJSONString(map);
+        return HttpClientUtil.httpPost(kf_url+"?access_token="+access_token,content);
+    }
+
 }

--
Gitblit v1.7.1