Browse Source

Merge remote-tracking branch 'origin/dev' into dev

fanxp 1 year ago
parent
commit
cddb9c9b47

+ 2 - 0
src/main/java/com/xjrsoft/common/utils/WeChatUtil.java

@@ -3,6 +3,7 @@ package com.xjrsoft.common.utils;
 
 import cn.hutool.http.HttpUtil;
 import com.alibaba.fastjson.JSONObject;
+import com.xjrsoft.common.exception.MyException;
 import com.xjrsoft.module.organization.dto.WeChatDepartDto;
 import com.xjrsoft.module.organization.dto.WeChatUserDto;
 import org.springframework.beans.factory.annotation.Value;
@@ -41,6 +42,7 @@ public class WeChatUtil {
         String result = HttpUtil.get("https://api.weixin.qq.com/sns/oauth2/access_token", paramMap);
         JSONObject jsonObject = JSONObject.parseObject(result);
         if (jsonObject.containsKey("errcode")) {
+            //throw new MyException(result);
             return null;
         }
         String openId = jsonObject.get("openid").toString();

+ 2 - 2
src/main/resources/application-dev.yml

@@ -86,8 +86,8 @@ xjrsoft:
     secret1: z3R17Od4ROW1zPisguiQmTfx0NvcYKmoIu19-82vdtU
     agentid: 1000003
   mpWeixin:
-    appKey: wx628ac080912b2a98
-    appSecret: c60d16835ae708bca8f0298243936850
+    appKey: wx93175d7fe68cd170
+    appSecret: 4bab1c5ccd9d4d1d7854464d7251becf
   dingtalk:
     appKey: dingaex2gok1rllumlqs
     appSecret: Nv2pe-UoR0Z_Iw8d29laZfL3kH6ElmhZpRdPwI7SvmKJmaCI29qCrSlFEiMM88MB