From d195f056616a6b0e50441699799cde179b5af325 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Wed, 7 Feb 2024 14:42:50 +0800 Subject: [PATCH] fix query audit bug --- app/mix/dao/mongo.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/mix/dao/mongo.go b/app/mix/dao/mongo.go index 6cba7580..c6885b2d 100644 --- a/app/mix/dao/mongo.go +++ b/app/mix/dao/mongo.go @@ -2490,13 +2490,13 @@ func (m *Mongo) GetImageAuditTaskList(ctx *gin.Context, req *imageaudittaskproto query["associative_data_base"] = util.DerefString(req.AssociativeDatabase) } if req.AssociativeTableName != nil { - query["associative_tabel_name"] = util.DerefString(req.AssociativeTableName) + query["associative_table_name"] = util.DerefString(req.AssociativeTableName) } if req.AssociativeTableId != nil { - query["associative_tabel_id"] = util.DerefInt64(req.AssociativeTableId) + query["associative_table_id"] = util.DerefInt64(req.AssociativeTableId) } if req.AssociativeTableColumn != nil { - query["associative_tabel_column"] = util.DerefString(req.AssociativeTableColumn) + query["associative_table_column"] = util.DerefString(req.AssociativeTableColumn) } if req.BatchId != nil { query["batch_id"] = util.DerefString(req.BatchId) @@ -2704,13 +2704,13 @@ func (m *Mongo) GetTextAuditTaskList(ctx *gin.Context, req *textaudittaskproto.O query["associative_data_base"] = util.DerefString(req.AssociativeDatabase) } if req.AssociativeTableName != nil { - query["associative_tabel_name"] = util.DerefString(req.AssociativeTableName) + query["associative_table_name"] = util.DerefString(req.AssociativeTableName) } if req.AssociativeTableId != nil { - query["associative_tabel_id"] = util.DerefInt64(req.AssociativeTableId) + query["associative_table_id"] = util.DerefInt64(req.AssociativeTableId) } if req.AssociativeTableColumn != nil { - query["associative_tabel_column"] = util.DerefString(req.AssociativeTableColumn) + query["associative_table_column"] = util.DerefString(req.AssociativeTableColumn) } if req.BatchId != nil { query["batch_id"] = util.DerefString(req.BatchId) @@ -2799,10 +2799,10 @@ func (m *Mongo) GetAlignedImageAuditTaskList(ctx *gin.Context, req *alignedaudit query["associative_data_base"] = util.DerefString(req.AssociativeDatabase) } if req.AssociativeTableName != nil { - query["associative_tabel_name"] = util.DerefString(req.AssociativeTableName) + query["associative_table_name"] = util.DerefString(req.AssociativeTableName) } if req.AssociativeTableId != nil { - query["associative_tabel_id"] = util.DerefInt64(req.AssociativeTableId) + query["associative_table_id"] = util.DerefInt64(req.AssociativeTableId) } if req.BatchId != nil { query["batch_id"] = util.DerefString(req.BatchId) @@ -2812,7 +2812,7 @@ func (m *Mongo) GetAlignedImageAuditTaskList(ctx *gin.Context, req *alignedaudit "$in": []int64{util.DerefInt64(req.Status), consts.ImageAudit_ForAlignment}, } } - sortClause := []string{"associative_data_base", "associative_tabel_name", "associative_tabel_id", "associative_table_column"} + sortClause := []string{"associative_data_base", "associative_table_name", "associative_table_id", "associative_table_column"} err := col.Find(ctx, query).Sort(sortClause...).Skip(int64(req.Offset)).Limit(int64(req.Limit)).All(&list) if err == qmgo.ErrNoSuchDocuments { err = nil @@ -2835,10 +2835,10 @@ func (m *Mongo) GetAlignedTextAuditTaskList(ctx *gin.Context, req *alignedauditt query["associative_data_base"] = util.DerefString(req.AssociativeDatabase) } if req.AssociativeTableName != nil { - query["associative_tabel_name"] = util.DerefString(req.AssociativeTableName) + query["associative_table_name"] = util.DerefString(req.AssociativeTableName) } if req.AssociativeTableId != nil { - query["associative_tabel_id"] = util.DerefInt64(req.AssociativeTableId) + query["associative_table_id"] = util.DerefInt64(req.AssociativeTableId) } if req.BatchId != nil { query["batch_id"] = util.DerefString(req.BatchId) @@ -2848,7 +2848,7 @@ func (m *Mongo) GetAlignedTextAuditTaskList(ctx *gin.Context, req *alignedauditt "$in": []int64{util.DerefInt64(req.Status), consts.TextAudit_ForAlignment}, } } - sortClause := []string{"associative_data_base", "associative_tabel_name", "associative_tabel_id", "associative_table_column"} + sortClause := []string{"associative_data_base", "associative_table_name", "associative_table_id", "associative_table_column"} err := col.Find(ctx, query).Sort(sortClause...).Skip(int64(req.Offset)).Limit(int64(req.Limit)).All(&list) if err == qmgo.ErrNoSuchDocuments { err = nil