zhangxiaofeng 4 months ago
commit e262dacdfc

@ -206,7 +206,10 @@ public class SysRoleService : ISysRoleService
/// <returns></returns>
public DataResult<long?[]> GetRolePermission(string id)
{
var data = db.Queryable<SysRolePermission>().Where(x => x.RoleId == long.Parse(id) && x.IsPermission == 1).Select(x => x.PermissionId).ToArray();
var tempIds = db.Queryable<SysPermission>().Where(x=>x.MenuType == 1).Select(x => x.Id).ToList();
var data = db.Queryable<SysRolePermission>().Where(x => x.RoleId == long.Parse(id) && x.IsPermission == 1 && !tempIds.Contains((long)x.PermissionId))
.Select(x => x.PermissionId).ToArray();
return DataResult<long?[]>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}

Loading…
Cancel
Save