Ver Fonte

DPCC新地址,以及刷新DPCC TOKEN

lighter há 6 meses atrás
pai
commit
865b748255

+ 7 - 0
thyy-scheduled/src/main/java/org/thyy/scheduled/controller/DpccController.java

@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.thyy.scheduled.service.DpccService;
+import org.thyy.scheduled.utils.AccessTokenUtil;
 
 @RestController
 @RequestMapping("/dpcc")
@@ -17,6 +18,12 @@ public class DpccController {
         this.service = service;
     }
 
+    @GetMapping("/refreshToken")
+    public String refreshToken() {
+        service.getToken();
+        return AccessTokenUtil.getInstance().get("dpccToken");
+    }
+
     @GetMapping("/uploadMzDataByDate")
     public String uploadMzDataByDate(@RequestParam("start") String start,
                                      @RequestParam("end") String end) {

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

@@ -75,9 +75,9 @@ thyy:
     client-secret: sino-client-csthyy
     password: d60dc4bf4acfa8956cd6819dba6966d0dab1ddac
     encrypt-key: d60dc4bf4acfa895
-    token-url: https://manage.national-dpcc.com/api/sino-auth/oauth/token
-    check-url: https://manage.national-dpcc.com/api/sino-common/access-client/uploadHisCheckData
-    drug-url: https://manage.national-dpcc.com/api/sino-common/access-client/uploadHisDrugData
+    token-url: https://dpcc.xyeyy.com/api/service-api/sino-auth/oauth/token
+    check-url: https://dpcc.xyeyy.com/api/service-api/sino-common/access-client/uploadHisCheckData
+    drug-url: https://dpcc.xyeyy.com/api/service-api/sino-common/access-client/uploadHisDrugData
     jy-api: http://172.16.32.160:21701/thyy/thirdpart/api/inspection
   emr:
     api: http://172.16.32.125:8001