Explorar el Código

删除已经无效的secret

lighter hace 5 meses
padre
commit
bccc80502e

+ 1 - 1
pom.xml

@@ -23,7 +23,7 @@
         <thyy-haikang>0.0.5</thyy-haikang>
         <thyy-emr-query>1.5.1</thyy-emr-query>
         <thyy-thirdpart-api>0.0.4</thyy-thirdpart-api>
-        <thyy-scheduled>0.0.7</thyy-scheduled>
+        <thyy-scheduled>0.0.8</thyy-scheduled>
         <thyy-plugins>0.0.1</thyy-plugins>
         <thyy-hospitalized>0.0.1</thyy-hospitalized>
         <thyy-medinsur>0.0.1</thyy-medinsur>

+ 0 - 1
thyy-scheduled/src/main/java/org/thyy/scheduled/config/constant/Corpwx.java

@@ -13,6 +13,5 @@ public class Corpwx {
     private String hospAppsSecret;
     private String clockinSecret;
     private String urgentMsgSecret;
-    private String filePushSecret;
     private String apiUrl;
 }

+ 3 - 0
thyy-scheduled/src/main/java/org/thyy/scheduled/controller/AccessTokenController.java

@@ -12,6 +12,9 @@ public class AccessTokenController {
 
     @GetMapping("/get")
     public String get(@RequestParam("key") String key) {
+        if (key.equals("corpwxFilePushToken")) {
+            key = "corpwxHospAppsToken";
+        }
         return AccessTokenUtil.getInstance().get(key);
     }
 

+ 0 - 14
thyy-scheduled/src/main/java/org/thyy/scheduled/service/CorpwxHttp.java

@@ -83,18 +83,4 @@ public class CorpwxHttp {
         log.info("获取企业微信紧急消息推送ACCESS_TOKEN: {}", corpwxUrgentMsgToken);
         AccessTokenUtil.getInstance().set("corpwxUrgentMsgToken",corpwxUrgentMsgToken);
     }
-
-    public void getFilePushToken() {
-        if (StrUtil.isBlank(corpwx.getFilePushSecret())) {
-            throw new BizException(ExceptionEnum.NO_CONFIGURATION);
-        }
-        String url = tokenApiUrl + corpwx.getFilePushSecret();
-        JSONObject json = template.getForObject(url, JSONObject.class);
-        if (json == null) {
-            throw new BizException(ExceptionEnum.API_ERROR);
-        }
-        String corpwxFilePushToken = json.getString("access_token");
-        log.info("获取企业微信发送文件ACCESS_TOKEN: {}", corpwxFilePushToken);
-        AccessTokenUtil.getInstance().set("corpwxFilePushToken", corpwxFilePushToken);
-    }
 }

+ 0 - 1
thyy-scheduled/src/main/resources/application-dev.yml

@@ -62,7 +62,6 @@ thyy:
     hosp-apps-secret:
     clockin-secret:
     urgent-msg-secret:
-    file-push-secret:
     api-url:
   lis-dock:
     app-id:

+ 0 - 1
thyy-scheduled/src/main/resources/application-prod.yml

@@ -62,7 +62,6 @@ thyy:
     hosp-apps-secret: _AZ3vGjRs8J_S7HEBPe-u7vHsAzo6iuHd5y1b5I3hEs
     clockin-secret: _DodO23wewvESf-Lt-K46O2OsZ_nwrNhCbGaj0gbFjQ
     urgent-msg-secret: xYHIiJldL1cn5-RbsyV2VIq505_22_3JY-U_gYpQ4hE
-    file-push-secret: OuES0b_KJMLOrltPc93JIJl1zoMdTROk6iHhOZuNUbg
     api-url: https://qyapi.weixin.qq.com/cgi-bin
   lis-dock:
     app-id: jkzd5e26bf01c5a0d79