@@ -29,8 +29,8 @@ public async Task<List<string>> GetPermissionRolesAsync(long userId)
29
29
var permissionRoles = await SugarClient
30
30
. Queryable < UserRole , RoleMenu , Menu > ( ( ur , rm , m ) => ur . RoleId == rm . RoleId && rm . MenuId == m . Id )
31
31
. GroupBy ( ( ur , rm , m ) => m . Permission )
32
- . Where ( ( ur , rm , m ) => ur . UserId == userId && m . Type != MenuType . Catalog )
33
- . OrderBy ( ( ur , rm , m ) => m . Sort )
32
+ . Where ( ( ur , rm , m ) => ur . UserId == userId && m . Type != MenuType . Catalog && m . Permission != null )
33
+ . OrderBy ( ( ur , rm , m ) => m . Permission )
34
34
. ClearFilter < ICreateByEntity > ( )
35
35
. Select ( ( ur , rm , m ) => m . Permission ) . ToListAsync ( ) ;
36
36
permissionRoles = permissionRoles . Where ( x => ! x . IsNullOrEmpty ( ) ) . ToList ( ) ;
@@ -50,6 +50,7 @@ public async Task<List<PermissionVo>> GetPermissionVoAsync(long userId)
50
50
. Queryable < UserRole , RoleApis , Apis > ( ( ur , ra , a ) => ur . RoleId == ra . RoleId && ra . ApisId == a . Id )
51
51
. GroupBy ( ( ur , ra , a ) => new { a . Url , a . Method } )
52
52
. Where ( ur => ur . UserId == userId )
53
+ . OrderBy ( ( ur , ra , a ) => a . Url )
53
54
. ClearFilter < ICreateByEntity > ( )
54
55
. Select ( ( ur , ra , a ) => new PermissionVo ( )
55
56
{
0 commit comments