|
@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil; |
|
|
import cn.hutool.extra.servlet.ServletUtil; |
|
|
import cn.hutool.extra.servlet.ServletUtil; |
|
|
import com.ccsens.tall.bean.dto.ProjectDto; |
|
|
import com.ccsens.tall.bean.dto.ProjectDto; |
|
|
import com.ccsens.tall.bean.dto.UserDto; |
|
|
import com.ccsens.tall.bean.dto.UserDto; |
|
|
|
|
|
import com.ccsens.tall.bean.po.SysUser; |
|
|
import com.ccsens.tall.bean.vo.MemberVo; |
|
|
import com.ccsens.tall.bean.vo.MemberVo; |
|
|
import com.ccsens.tall.bean.vo.UserVo; |
|
|
import com.ccsens.tall.bean.vo.UserVo; |
|
|
import com.ccsens.tall.exception.UserLoginException; |
|
|
import com.ccsens.tall.exception.UserLoginException; |
|
@ -413,15 +414,16 @@ public class UserController { |
|
|
if(userService.tokenNotExistInCache(Long.valueOf(claims.getSubject()))){ |
|
|
if(userService.tokenNotExistInCache(Long.valueOf(claims.getSubject()))){ |
|
|
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); |
|
|
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); |
|
|
} |
|
|
} |
|
|
// //验证用户是否禁用
|
|
|
|
|
|
// SysUser user = userService.getUserById(Long.valueOf(claims.getSubject()));
|
|
|
|
|
|
// if(user.getRecStatus() == WebConstant.REC_STATUS.Disabled.value){
|
|
|
|
|
|
// return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN);
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
tokenToUserId.setId(Long.valueOf(claims.getSubject())); |
|
|
tokenToUserId.setId(Long.valueOf(claims.getSubject())); |
|
|
long end = System.currentTimeMillis(); |
|
|
long end = System.currentTimeMillis(); |
|
|
log.info("根据token查找userId用时:{}",end - start); |
|
|
log.info("根据token查找userId用时:{}",end - start); |
|
|
|
|
|
SysUser sysUser = userService.getUserById(Long.valueOf(claims.getSubject())); |
|
|
|
|
|
if(ObjectUtil.isNotNull(sysUser)){ |
|
|
|
|
|
tokenToUserId.setAvatarUrl(sysUser.getAvatarUrl()); |
|
|
|
|
|
} |
|
|
|
|
|
tokenToUserId.setUserName(userService.getUserNameByUserId(Long.valueOf(claims.getSubject()))); |
|
|
|
|
|
|
|
|
return JsonResponse.newInstance().ok(tokenToUserId); |
|
|
return JsonResponse.newInstance().ok(tokenToUserId); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|