|
@@ -169,8 +169,7 @@ public class AuthRedirectController {
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
|
|
|
headers.setContentType(type);
|
|
|
- headers.setBearerAuth(feishuInfoService.getAppAccessToken(feishuInfo));
|
|
|
- headers.add("Accept", MediaType.APPLICATION_JSON.toString());
|
|
|
+ headers.add("Authorization","Bearer "+feishuInfoService.getAppAccessToken(feishuInfo));
|
|
|
JSONObject ob = new JSONObject();
|
|
|
ob.put("grant_type", "authorization_code");
|
|
|
ob.put("code", code);
|
|
@@ -186,9 +185,10 @@ public class AuthRedirectController {
|
|
|
JSONObject obj = JSONObject.parseObject(resp);
|
|
|
if (obj.getIntValue("code") == 0) {
|
|
|
System.out.println(obj.toString());
|
|
|
- fsUserId = obj.getString("UserId");
|
|
|
- openUserId = obj.getString("open_id");
|
|
|
- corpId = obj.getString("tenant_key");
|
|
|
+ JSONObject data = obj.getJSONObject("data");
|
|
|
+ fsUserId = data.getString("user_id");
|
|
|
+ openUserId = data.getString("open_id");
|
|
|
+ corpId = data.getString("tenant_key");
|
|
|
}
|
|
|
}
|
|
|
List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("feishu_userid", openUserId));
|
|
@@ -239,9 +239,9 @@ public class AuthRedirectController {
|
|
|
}
|
|
|
}
|
|
|
if (isMobile) {
|
|
|
- redirecUrl = "https://mobworktime.ttkuaiban.com/#/" + router;
|
|
|
+ redirecUrl = "http://47.101.180.183:9097/#/" + router;
|
|
|
} else {
|
|
|
- redirecUrl = "https://worktime.ttkuaiban.com/#/" + router;
|
|
|
+ redirecUrl = "http://47.101.180.183:9097/#/" + router;
|
|
|
}
|
|
|
ModelAndView modelAndView = new ModelAndView(
|
|
|
new RedirectView(redirecUrl), reqParam);
|