From aa710d72d71ee05b2140e82750cb27b73714517f Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 3 Nov 2022 16:16:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=98=9F=E5=BA=A7=E5=9B=BE?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=88=9D=E5=A7=8B=E5=8C=96bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/horoscope/modelhoroscope.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/horoscope/modelhoroscope.go b/modules/horoscope/modelhoroscope.go index 2630dfb28..a3ae07481 100644 --- a/modules/horoscope/modelhoroscope.go +++ b/modules/horoscope/modelhoroscope.go @@ -28,11 +28,17 @@ func (this *modelHoroscope) Init(service core.IService, module core.IModule, com //查询用户装备数据 func (this *modelHoroscope) queryInfo(uId string) (result *pb.DBHoroscope, err error) { - result = &pb.DBHoroscope{} + result = &pb.DBHoroscope{ + Uid: uId, + Nodes: make(map[int32]int32), + } if err = this.Get(uId, result); err != nil && err != mgo.MongodbNil { this.module.Errorln(err) return } + if err != mgo.MongodbNil { + err = nil + } return }