diff --git a/dao/etl/implments/record.dao.impl.go b/dao/etl/implments/record.dao.impl.go index fc3a384..94706b0 100644 --- a/dao/etl/implments/record.dao.impl.go +++ b/dao/etl/implments/record.dao.impl.go @@ -103,7 +103,7 @@ func (impl *RecordDaoImplement) Select(collectionName string, stage, status, sta cursor, err := impl.client.Database(config.AppConfig.Mongo.LogDB).Collection(collectionName).Find(context.TODO(), condition, &options.FindOptions{ Skip: &skip, Limit: &limit, - Sort: bson.D{{"timestamp", -1}}, + Sort: bson.D{{"time", -1}}, }) if err != nil { return grmi.EmptyPagingResult, err diff --git a/web/controllers/etl/Record.rest.go b/web/controllers/etl/Record.rest.go index 26d7d13..917977c 100644 --- a/web/controllers/etl/Record.rest.go +++ b/web/controllers/etl/Record.rest.go @@ -44,17 +44,17 @@ func RegisterSelect(party router.Party, httpMethod string, path string, method f batchId := ctx.URLParam("batchId") start := ctx.URLParam("start") end := ctx.URLParam("end") - pageIndexStr := ctx.URLParam("pageIndex") - pageNumStr := ctx.URLParam("pageNum") - pageIndex, err := strconv.Atoi(pageIndexStr) + pageNumberStr := ctx.URLParam("pageNumber") + pageSizeStr := ctx.URLParam("pageSize") + pageIndex, err := strconv.Atoi(pageNumberStr) if err != nil { pageIndex = 1 } - pageNumber, err := strconv.Atoi(pageNumStr) + pageSize, err := strconv.Atoi(pageSizeStr) if err != nil { - pageNumber = 10 + pageSize = 10 } - result, err := method(taskId, stage, status, batchId, start, end, pageIndex, pageNumber) + result, err := method(taskId, stage, status, batchId, start, end, pageIndex, pageSize) if err != nil { supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) return