From 2aad5c6ca552423d1b8e6e8c869a698a15822759 Mon Sep 17 00:00:00 2001
From: fhx <308050795@qq.com>
Date: 星期二, 25 四月 2023 15:32:39 +0800
Subject: [PATCH] 1.修改redis工具

---
 src/main/java/com/hx/mp/util/CorpMpClientUtil.java |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 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 32d0670..cf6c742 100644
--- a/src/main/java/com/hx/mp/util/CorpMpClientUtil.java
+++ b/src/main/java/com/hx/mp/util/CorpMpClientUtil.java
@@ -226,4 +226,34 @@
         }
         return obj;
     }
+
+    /**鐢熸垚浼佷笟鎴愬憳鑱旂郴鎴戠殑id-鍗曚汉
+     * @param accessToken 浼佷笟鐨刟ccessToken
+     * @param userId 浼佷笟鎴愬憳鐨剈serId
+     * @param scene 鍦烘櫙锛�1-鍦ㄥ皬绋嬪簭涓仈绯伙紝2-閫氳繃浜岀淮鐮佽仈绯�
+     * @param state 浼佷笟鑷畾涔夌殑state鍙傛暟锛岀敤浜庡尯鍒嗕笉鍚岀殑娣诲姞娓犻亾锛屽湪璋冪敤鈥滆幏鍙栧閮ㄨ仈绯讳汉璇︽儏鈥濇椂浼氳繑鍥炶鍙傛暟鍊硷紝涓嶈秴杩�30涓瓧绗�
+     * @param remark 鑱旂郴鏂瑰紡鐨勫娉ㄤ俊鎭紝鐢ㄤ簬鍔╄锛屼笉瓒呰繃30涓瓧绗�
+     * @return
+     */
+    public static JSONObject createContactId(String accessToken,String userId,int scene,String state,String remark){
+
+        String configId = null;
+        JSONObject data = new JSONObject();
+        data.put("type",1);
+        data.put("scene",scene);
+        data.put("state",state);
+        data.put("remark",remark);
+        JSONArray userIds = new JSONArray();
+        userIds.add(userId);
+        data.put("user",userIds);
+
+        //璇锋眰锛岃繑鍥炴牸寮�
+       /*{
+           "errcode": 0,
+               "errmsg": "ok",
+               "config_id":"42b34949e138eb6e027c123cba77fAAA"銆�銆�
+       }*/
+
+        return HttpURLUtil(CREATE_CONTACT_ID_URL+accessToken,data.toString());
+    }
 }

--
Gitblit v1.8.0