We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OperatingRecordSchema = new Schema({ product_id: { // 商品ID type: Schema.ObjectId, required: true, index: true }, product_name: String, //商品名称 count: Number, // 商品的数量 operator: String, //操作人 operate_status: { // 操作状态【入库 0 | 出库 1 】 type: Number, required: true }, user_to_id: { // 收货人id from contact type: Schema.ObjectId, index: true }, user_to_name:String, user_to_address: String, user_to_phone: String, user_name: String, //发货人姓名 user_id: { // 用户的id type: Schema.ObjectId, // required: true, index: true }, created_at: { type: Date, default: Date.now } });
使用 top 第一次加载5条:
1 2 3 4 5 <-- last_index
点击加载更多(使用 pageByLastId 再加载5条):
1 2 3 4 5 6 7 8 9 10
使用 top 第一次加载5条:
10 9 8 7 6 <-- last_index
点击加载更多(使用 pageByLastId 再加载5条)出现了问题:
排序变成了这样:
10 9 8 7 6 10 9 8 7
这次使用 pageByLastId 只加载出了 4条数据,而且 10,9,8,7 重复地取出来了
The text was updated successfully, but these errors were encountered:
No branches or pull requests
表结构
现在数据库有10条数据(按顺序创建的)
PageSize为5, 根据 created_at 升序排序时一切正常:
使用 top 第一次加载5条:
点击加载更多(使用 pageByLastId 再加载5条):
当根据 created_at 降序排序时:
使用 top 第一次加载5条:
点击加载更多(使用 pageByLastId 再加载5条)出现了问题:
排序变成了这样:
这次使用 pageByLastId 只加载出了 4条数据,而且 10,9,8,7 重复地取出来了
The text was updated successfully, but these errors were encountered: