|
|
@ -40,13 +40,29 @@ public class SysLoginController
|
|
|
|
private ISysPostService postService;
|
|
|
|
private ISysPostService postService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 登录方法
|
|
|
|
* PDA登录
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param loginBody 登录信息
|
|
|
|
* @param loginBody 登录信息
|
|
|
|
* @return 结果
|
|
|
|
* @return 结果
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("/login")
|
|
|
|
@PostMapping("/login")
|
|
|
|
public AjaxResult login(@RequestBody LoginBody loginBody)
|
|
|
|
public AjaxResult login(@RequestBody LoginBody loginBody)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AjaxResult ajax = AjaxResult.success();
|
|
|
|
|
|
|
|
// 生成令牌
|
|
|
|
|
|
|
|
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), "PDA_VALIDATE", loginBody.getUuid());
|
|
|
|
|
|
|
|
ajax.put(Constants.TOKEN, token);
|
|
|
|
|
|
|
|
return ajax;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 系统登录
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param loginBody 登录信息
|
|
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/indexLogin")
|
|
|
|
|
|
|
|
public AjaxResult indexLogin(@RequestBody LoginBody loginBody)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AjaxResult ajax = AjaxResult.success();
|
|
|
|
AjaxResult ajax = AjaxResult.success();
|
|
|
|
// 生成令牌
|
|
|
|
// 生成令牌
|
|
|
|