|
@@ -128,20 +128,11 @@ public class UserController extends AppBaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Login
|
|
|
@ApiOperation("检测是否登录")
|
|
|
@GetMapping("/checkLogin")
|
|
|
- public R checkLogin(HttpServletRequest request){
|
|
|
- if(StringUtils.isEmpty(getUserId())){
|
|
|
- //未登录
|
|
|
- return R.error("未登录");
|
|
|
- }
|
|
|
- else{
|
|
|
- //登录
|
|
|
- String token = jwtUtils.generateToken(Long.parseLong(getUserId()));
|
|
|
- Map<String,Object> map=new HashMap<>();
|
|
|
- map.put("token",token);
|
|
|
- return R.ok("认证成功").put("userId",getUserId()).put("token",token);
|
|
|
- }
|
|
|
+ public R checkLogin(){
|
|
|
+ return R.ok("认证成功");
|
|
|
}
|
|
|
|
|
|
@Login
|