Преглед изворни кода

修复天阙回复内容OrgId超长问题. 用户不存在返回code:403

qinchaoyue пре 1 недеља
родитељ
комит
a6f1df8c31

+ 5 - 2
src/Hotline.Application/Identity/IdentityAppService.cs

@@ -354,8 +354,11 @@ public class IdentityAppService : IIdentityAppService, IScopeDependency
 
     public async Task<Dictionary<string, object>> RefreshTokenAsync(string openId, CancellationToken token)
     {
-        var thirdAccount = await _thirdAccountRepository.GetByOpenIdAsync(openId, token)
-            ?? throw UserFriendlyException.SameMessage("未找到用户信息");
+        var thirdAccount = await _thirdAccountRepository.GetByOpenIdAsync(openId, token);
+        if (thirdAccount is null)
+        {
+            throw new UserFriendlyException(403, "用户不存在");
+        }
 
         return await GetJwtToken(thirdAccount, token);
     }

+ 1 - 1
src/TianQue.Sdk/Models/ApiReponse.cs

@@ -43,5 +43,5 @@ public class AcceptInfoSuccessDto
     /// <summary>
     /// OrgId
     /// </summary>
-    public uint OrgId { get; set; }
+    public string OrgId { get; set; }
 }