Bläddra i källkod

1、钉钉授权创建租户问题处理

dongpo 1 månad sedan
förälder
incheckning
086469cc6a

+ 5 - 0
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dingding/DingAuthServiceInfoImpl.java

@@ -279,11 +279,14 @@ public class DingAuthServiceInfoImpl implements DingAuthServiceInfo {
         JSONObject authUserInfo = JSONObject.parseObject(auth_user_info_str);
 //        String accessToken = dingThirdTokenService.getCorpAccessToken(corp_id);
         String manager_userid = authUserInfo.getString("userId");
+        String suiteTicket = biz_data.getString("suiteTicket");
         TenantDingSaveReqVO respVO = new TenantDingSaveReqVO();
         respVO.setCorpId(authCorpInfo.getString("corpid"));
         respVO.setName(authCorpInfo.getString("full_corp_name"));
         respVO.setManageUserId(manager_userid);
         respVO.setExpireTime(LocalDateTime.now().plusYears(10));// 默认设置10年有效期
+        respVO.setStatus(0);
+        respVO.setSuiteTicket(suiteTicket);
         tenantService.createDingTenant(respVO);
     }
 
@@ -304,10 +307,12 @@ public class DingAuthServiceInfoImpl implements DingAuthServiceInfo {
         JSONObject authUserInfo = JSONObject.parseObject(auth_user_info_str);
 //        String accessToken = dingThirdTokenService.getCorpAccessToken(corp_id);
         String manager_userid = authUserInfo.getString("userId");
+        String suiteTicket = biz_data.getString("suiteTicket");
         TenantDingSaveReqVO respVO = new TenantDingSaveReqVO();
         respVO.setCorpId(authCorpInfo.getString("corpid"));
         respVO.setName(authCorpInfo.getString("full_corp_name"));
         respVO.setManageUserId(manager_userid);
+        respVO.setSuiteTicket(suiteTicket);
         tenantService.updateDingTenant(respVO);
     }