提交 dd9ad1cd 作者: zhenjie

空指针异常修复

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