From 19a9687715dc79c275359443af55d6112cd5d704 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 21 十一月 2023 19:01:42 +0800 Subject: [PATCH] 同步状态和生产数按id正序取 --- service/progress.go | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/service/progress.go b/service/progress.go index 2e7bc07..4b3dca5 100644 --- a/service/progress.go +++ b/service/progress.go @@ -55,7 +55,7 @@ var ok bool progressCache, ok = ProgressCacheGet(channel) if !ok { - progressCache, err = model.NewProductionProgressSearch(nil).SetDeviceId(conf.Conf.CurrentDeviceID).SetChannel(channel).SetOrder("id desc").First() + progressCache, err = model.NewProductionProgressSearch(nil).SetDeviceId(conf.Conf.CurrentDeviceID).SetChannel(channel).SetOrder("id asc").First() if err == gorm.ErrRecordNotFound { return nil, errors.New("progress not found") } -- Gitblit v1.8.0