上传月子秘境测试修复

This commit is contained in:
liwei1dao 2022-09-01 15:19:39 +08:00
parent 8c11261751
commit 33af640bd4
3 changed files with 20 additions and 4 deletions

View File

@ -38,5 +38,20 @@
"msgid": "chat.send", "msgid": "chat.send",
"routrules": "~/worker", "routrules": "~/worker",
"describe": "聊天消息发送" "describe": "聊天消息发送"
},
{
"msgid": "forum.like",
"routrules": "~/worker",
"describe": "论坛点赞入口"
},
{
"msgid": "moonfantasy.trigger",
"routrules": "~/worker",
"describe": "月之秘境触发接口"
},
{
"msgid": "moonfantasy.dare",
"routrules": "~/worker",
"describe": "月之秘境参战接口"
} }
] ]

View File

@ -8,7 +8,6 @@ import (
"math/big" "math/big"
"time" "time"
"go.mongodb.org/mongo-driver/mongo"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
) )
@ -39,7 +38,7 @@ func (this *apiComp) Trigger(session comm.IUserSession, req *pb.MoonfantasyTrigg
issucc = false issucc = false
} }
if issucc { if issucc {
if uexpand, err = this.module.ModuleUser.GetUserExpand(session.GetUserId()); err != nil && err != mongo.ErrNoDocuments { if uexpand, err = this.module.ModuleUser.GetUserExpand(session.GetUserId()); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
this.module.Errorln(err) this.module.Errorln(err)
return return
@ -72,6 +71,7 @@ func (this *apiComp) Trigger(session comm.IUserSession, req *pb.MoonfantasyTrigg
Avatar: req.Avatar, Avatar: req.Avatar,
Uname: req.Uname, Uname: req.Uname,
Slv: req.Ulv, Slv: req.Ulv,
Stag: session.GetServiecTag(),
AppendInt: int64(mdata.Monster), AppendInt: int64(mdata.Monster),
AppendStr: mdata.Id, AppendStr: mdata.Id,
} }

View File

@ -3,6 +3,7 @@ package moonfantasy
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
@ -65,8 +66,8 @@ func (this *modelDreamComp) noticeuserfriend(stag, uid string, chat *pb.DBChat)
err error err error
) )
model := db.NewDBModel(comm.TableFriend, 0, db.ServerDBConn(stag)) model := db.NewDBModel(comm.TableFriend, 0, db.ServerDBConn(stag))
friend := &pb.DBFriend{Uid: uid} friend := &pb.DBFriend{Uid: uid, FriendIds: make([]string, 0)}
if err = model.Get(uid, friend); err != nil { if err = model.Get(uid, friend); err != nil && err != mgo.MongodbNil {
this.module.Errorln(err) this.module.Errorln(err)
return return
} }