Merge pull request 'feat-IRONFANS-212-Robin' (#929) from feat-IRONFANS-212-Robin into test

Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/service/pulls/929
This commit is contained in:
chenhao 2024-12-25 13:02:55 +08:00
commit 8c24850420
1 changed files with 3 additions and 3 deletions

View File

@ -1867,7 +1867,7 @@ func (m *Mongo) GetMomentListByIds(ctx *gin.Context, momentIds []int64) ([]*dbst
err := col.Find(ctx, query).Sort("_id").All(&list)
if err == qmgo.ErrNoSuchDocuments {
err = nil
return list, err
return make([]*dbstruct.Moment, 0), err
}
return list, err
}
@ -5052,10 +5052,10 @@ func (m *Mongo) GetZoneMomentById(ctx *gin.Context, id int64) (*dbstruct.ZoneMom
"_id": id,
"del_flag": 0,
}
err := col.Find(ctx, query).One(&zonemoment)
err := col.Find(ctx, query).One(zonemoment)
if err == qmgo.ErrNoSuchDocuments {
err = nil
return zonemoment, err
return nil, err
}
return zonemoment, err
}