fix: fix the bug of the play view

This commit is contained in:
Rogee
2024-12-13 11:34:09 +08:00
parent 1f8371b878
commit 7c52823610
5 changed files with 23 additions and 6 deletions

View File

@@ -131,12 +131,12 @@ func (svc *Service) List(ctx context.Context, tenantId, userId int64, filter *Li
if filter.OffsetID > 0 {
if filter.Action == 0 {
stmt = stmt.WHERE(tbl.ID.GT(Int(filter.OffsetID)))
stmt = stmt.WHERE(tbl.ID.LT(Int(filter.OffsetID)))
stmt = stmt.LIMIT(10)
}
if filter.Action == 1 {
stmt = stmt.WHERE(tbl.ID.LT(Int(filter.OffsetID)))
stmt = stmt.LIMIT(10)
stmt = stmt.WHERE(tbl.ID.GT(Int(filter.OffsetID)))
}
} else {
stmt = stmt.LIMIT(10)