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)); + } }