From c6e957c016d837d82b50e7a05118d9317b5367a1 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Wed, 1 Feb 2023 09:16:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=8E=A5=E5=8F=A3:/queryHuan?= =?UTF-8?q?gDao=20=E8=A1=A5=E5=85=85token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/xkrs/controller/FirePointController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/xkrs/controller/FirePointController.java b/src/main/java/com/xkrs/controller/FirePointController.java index e295fff..cbcf1c2 100644 --- a/src/main/java/com/xkrs/controller/FirePointController.java +++ b/src/main/java/com/xkrs/controller/FirePointController.java @@ -82,7 +82,10 @@ public class FirePointController { } @GetMapping("/queryHuangDao") - public String queryHuangDao() { + public String queryHuangDao(@RequestHeader(value = "Authorization") String token) { + if (TextUtils.isEmpty(token) || (!token.equals("Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxNTcyNjI0MDI1MSIsImlzcyI6Imh0dHBzOi8vd3d3Lm1pY3Jvc2VydmljZS5jb20iLCJhdWQiOiIxNTcyNjI0MDI1MSIsImF1dGhzIjoiYXV0aF9nZW5lcmFsX3VzZXIiLCJleHAiOjE2NzUyMzQzNjl9.iE9o6KblAgQP8Q0Vx7AJOV6BVYCOJrfpU886IZiARGdIVm77dx3l1UHM-bTMUlaVyG7-9BY0sOfCD3wHfLT3MA"))) { + return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, "无效token", locale); + } List firePointList = firePointQueryHelper.queryFirePoint("370211", "2023-01-01 00:00:10", null, null, null); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointList, locale); }