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