fix query audit bug
This commit is contained in:
parent
cffaa2c880
commit
d195f05661
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue