我滴个乖乖

This commit is contained in:
zel
2025-02-20 15:20:28 +08:00
parent 4b54cca70b
commit 485cfcd6f2
2343 changed files with 495732 additions and 1022 deletions

View File

@@ -0,0 +1,28 @@
SELECT
U.UserId,
U.Avatar,
ANU.Email as EmailAddress,
U.AccountName,
U.Navigation,
U.Biography,
(select UC.ClaimValue from AspNetUserClaims as UC WHERE UC.UserId = U.UserId AND UC.ClaimType = 'firstname') as FirstName,
(select UC.ClaimValue from AspNetUserClaims as UC WHERE UC.UserId = U.UserId AND UC.ClaimType = 'lastname') as LastName,
(select UC.ClaimValue from AspNetUserClaims as UC WHERE UC.UserId = U.UserId AND UC.ClaimType = 'timezone') as TimeZone,
(select UC.ClaimValue from AspNetUserClaims as UC WHERE UC.UserId = U.UserId AND UC.ClaimType = 'language') as Language,
(select UC.ClaimValue from AspNetUserClaims as UC WHERE UC.UserId = U.UserId AND UC.ClaimType LIKE '%/country') as Country,
(select UC.ClaimValue from AspNetUserClaims as UC WHERE UC.UserId = U.UserId AND UC.ClaimType = 'theme') as Theme,
U.CreatedDate,
U.ModifiedDate,
UCR.ClaimValue as Role,
ANU.EmailConfirmed
FROM
Profile as U
INNER JOIN AspNetUsers as ANU
ON ANU.Id = U.UserId
INNER JOIN AspNetUserClaims as UCR
ON UCR.UserId = U.UserId
AND UCR.ClaimType LIKE '%/role'
INNER JOIN Role as R
ON R.Name = UCR.ClaimValue
WHERE
U.Navigation = @Navigation