Przeglądaj źródła

UserRole#name 的值是 AccountRole#getValue

reghao 1 miesiąc temu
rodzic
commit
8b79aa0812

+ 1 - 1
auth/auth-service/src/main/java/cn/reghao/tnb/auth/app/service/AccountProfileService.java

@@ -48,7 +48,7 @@ public class AccountProfileService {
 
         AccountAuthToken authToken = accountTokenService.getAuthToken();
         long userId = authToken.getUserId();
-        accountRepository.addUserRole(userId, roleName);
+        accountRepository.addUserRole(userId, accountRole.getValue());
         return Result.success();
     }