Skip to content

任意楼定位的懒加载 #67

@JingYiJun

Description

@JingYiJun

Describe the feature

前端如果需要跳转到任意楼层,需要加载整个洞,这对于高回复数的洞是不可取的。

Describe how to implement it

使用 floor.ranking 字段,加载对应楼的上下各 size 个楼,默认 size = 10;返回值中将包含最多 2 * size + 1 个楼。由于一个洞可能很小,一个楼的前后可能都不足 size 个楼,需要前端来判断加载位置。

select hole, ranking from floor where id = ?;
select * from floor where hold_id = ? and ranking between ? - size and ? + size;

What does this feature intend to do

对于高楼层的查询优化

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions