From 8f574d73fb70a79103b822282134ab9556644aa1 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Thu, 25 Apr 2024 17:20:35 +0800 Subject: [PATCH] by Robin at 20240425 --- app/mix/dao/mongo.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/mix/dao/mongo.go b/app/mix/dao/mongo.go index b746180a..b41fd720 100644 --- a/app/mix/dao/mongo.go +++ b/app/mix/dao/mongo.go @@ -4705,13 +4705,13 @@ func (m *Mongo) CreateZoneThirdPartnerHis(ctx *gin.Context, zone_third_partner * // 动态创建频次 func (m *Mongo) GetZoneMomentCreateTimes(ctx *gin.Context, mid int64) (momentCreateTimes *dbstruct.ZoneMomentCreateTimes, err error) { col := m.getColZoneMomentCreateTimes() - momentCreateTimesInstance := dbstruct.ZoneMomentCreateTimes{} - err = col.Find(ctx, qmgo.M{"_id": mid}).One(&momentCreateTimes) + momentCreateTimes = &dbstruct.ZoneMomentCreateTimes{} + err = col.Find(ctx, qmgo.M{"_id": mid}).One(momentCreateTimes) if err == qmgo.ErrNoSuchDocuments { err = nil return nil, err } - return &momentCreateTimesInstance, err + return momentCreateTimes, err } func (m *Mongo) GetAndUpdateZoneMomentCreateTimes(ctx *gin.Context, mid int64, cType int64) (momentCreateTimes *dbstruct.ZoneMomentCreateTimes, err error) {