auth:增加pda登录接口
master
xins 10 months ago
parent aa41aa2d8b
commit b834e9e63c

@ -19,7 +19,7 @@ import com.hw.system.api.model.LoginUser;
/** /**
* token * token
* *
* @author ruoyi * @author ruoyi
*/ */
@RestController @RestController
@ -75,4 +75,14 @@ public class TokenController
sysLoginService.register(registerBody.getUsername(), registerBody.getPassword()); sysLoginService.register(registerBody.getUsername(), registerBody.getPassword());
return R.ok(); 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));
}
} }

Loading…
Cancel
Save