From b834e9e63c645e5022bc1d57d0c3a45f0f525756 Mon Sep 17 00:00:00 2001 From: xins Date: Fri, 2 Feb 2024 11:11:27 +0800 Subject: [PATCH] =?UTF-8?q?1.4.6=20auth:=E5=A2=9E=E5=8A=A0pda=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hw/auth/controller/TokenController.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hw-auth/src/main/java/com/hw/auth/controller/TokenController.java b/hw-auth/src/main/java/com/hw/auth/controller/TokenController.java index b884363..008fcb2 100644 --- a/hw-auth/src/main/java/com/hw/auth/controller/TokenController.java +++ b/hw-auth/src/main/java/com/hw/auth/controller/TokenController.java @@ -19,7 +19,7 @@ import com.hw.system.api.model.LoginUser; /** * token 控制 - * + * * @author ruoyi */ @RestController @@ -75,4 +75,14 @@ public class TokenController sysLoginService.register(registerBody.getUsername(), registerBody.getPassword()); return R.ok(); } + + + @PostMapping("pdaLogin") + public R pdaLogin(@RequestBody LoginBody form) + { + // 用户登录 + LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword()); + // 获取登录token + return R.ok(tokenService.createToken(userInfo)); + } }