提交 dd9ad1cd 作者: zhenjie

空指针异常修复

上级 4b2c7dae
......@@ -32,6 +32,8 @@ public class TokenCheckHandleInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
String requestURI = request.getRequestURI();
String remoteHost = request.getRemoteHost();
System.out.println("remoteHost: " + remoteHost);
// //根据uri确认是否要拦截
// if (!shouldFilter(requestURI)){
// return true;
......
......@@ -88,7 +88,7 @@ public class AuthServiceImpl implements AuthService {
}
//数据库查询用户信息
UserAccountVO userAccountVO = userAccountService.getUserAccountInfoByUnionId(unionId);
String uid = userAccountVO.getUid();
String uid;
if (userAccountVO == null) {
UserAccountDO userAccountDO = new UserAccountDO();
userAccountDO.setUnionId(unionId);
......@@ -100,6 +100,8 @@ public class AuthServiceImpl implements AuthService {
userAccountDO.setSource(wxLoginVO.getSource());
userAccountService.insertUserAccount(userAccountDO);
userAccountVO = userAccountDO.buildUserAccountVO();
}else {
uid = userAccountVO.getUid();
}
Map<String, Object> map = new HashMap<String, Object>();
map.put(JwtConstant.USER_ACCOUNT_ID, userAccountVO.getId());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论