|
|
@@ -91,7 +91,7 @@ public class AuthorizationController {
|
|
|
private final DistributeService distributeService;
|
|
|
|
|
|
@GetMapping(value = "/weChat")
|
|
|
- public void base(String url,Long sharedId, String authType, HttpServletResponse response) throws Exception {
|
|
|
+ public void base(String url, Long sharedId, Integer dsType, Long popularizeId, String authType, HttpServletResponse response) throws Exception {
|
|
|
|
|
|
log.info("微信授权转跳. url: {},authType:{}",url,authType);
|
|
|
|
|
|
@@ -101,7 +101,7 @@ public class AuthorizationController {
|
|
|
|
|
|
Long mappingId = SEQUENCE.nextId();
|
|
|
redisService.set(mappingId.toString(),url,60*60*24L);
|
|
|
- AuthRedirect redirect = new AuthRedirect().setMappingId(mappingId).setSharedId(sharedId);
|
|
|
+ AuthRedirect redirect = new AuthRedirect().setMappingId(mappingId).setSharedId(sharedId).setDsType(dsType).setPid(popularizeId);
|
|
|
String state = Codec.DoBase64.custom().setData(Jsons.toJson(redirect)).encodeAsText();
|
|
|
|
|
|
response.sendRedirect(authorizationService.createUrl(state,authType));
|
|
|
@@ -127,7 +127,7 @@ public class AuthorizationController {
|
|
|
GzhOAuth2UserInfo userinfo = weChatService.getUserInfo(token.getAccessToken(), token.getOpenid());
|
|
|
|
|
|
//保存用户信息
|
|
|
- User user = userService.saveAuth(userinfo, re.getSharedId());
|
|
|
+ User user = userService.saveAuth(userinfo, re.getSharedId(),re.getDsType(), re.getPid());
|
|
|
|
|
|
//写回登陆信息
|
|
|
StpUserUtil.login(user.getId());
|