提交 f3feaca2 作者: 余乾开

Merge branch 'develop'

package com.mmc.iuav.user.auth; package com.mmc.iuav.user.auth;
import com.alibaba.fastjson2.JSONObject; import java.io.PrintWriter;
import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.response.ResultEnum; import javax.servlet.http.HttpServletRequest;
import com.mmc.iuav.user.model.dto.LoginSuccessDTO; import javax.servlet.http.HttpServletResponse;
import com.mmc.iuav.user.util.PathUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest; import com.mmc.iuav.response.ResultBody;
import javax.servlet.http.HttpServletResponse; import com.mmc.iuav.response.ResultEnum;
import java.io.PrintWriter; import com.mmc.iuav.user.util.PathUtil;
/** /**
* @author: zj * @author: zj
...@@ -32,6 +31,8 @@ public class TokenCheckHandleInterceptor implements HandlerInterceptor { ...@@ -32,6 +31,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;
......
...@@ -38,5 +38,4 @@ public class TempLoginController extends BaseController { ...@@ -38,5 +38,4 @@ public class TempLoginController extends BaseController {
return authService.getLoginInfo(randomLoginCode); return authService.getLoginInfo(randomLoginCode);
} }
// test
} }
...@@ -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());
......
...@@ -6,9 +6,9 @@ data-filter: ...@@ -6,9 +6,9 @@ data-filter:
- /userapp/doc.html - /userapp/doc.html
- /userapp/swagger-resources/** - /userapp/swagger-resources/**
- /userapp/webjars/** - /userapp/webjars/**
- /userapp/auth/testAppletLogin
- /userapp/auth/backEndLogin - /userapp/auth/backEndLogin
- /userapp/auth/testAppletLogin - /userapp/auth/testAppletLogin
- /userapp/auth/appletLogin
- /userapp/cooperation/listTag - /userapp/cooperation/listTag
- /userapp/temp-auth/getLoginInfo - /userapp/temp-auth/getLoginInfo
- /userapp/wx/getAppletQRCode - /userapp/wx/getAppletQRCode
...@@ -17,4 +17,4 @@ patches: ...@@ -17,4 +17,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag: 9c8b081014a6dc23abc91032b0c093202bfa69bb newTag: 3c361661bdb07ff498ea942e250c47b212509789
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论