上传月子秘境挑战卷回复机制
This commit is contained in:
parent
f5e124b7d0
commit
6665072e8d
@ -34,17 +34,25 @@ func (this *modelUserMF) Init(service core.IService, module core.IModule, comp c
|
||||
}
|
||||
|
||||
///查询用户秘境列表
|
||||
func (this *modelUserMF) queryUsermfantasy(uId string) (fantasy *pb.DBUserMFantasy, err error) {
|
||||
fantasy = &pb.DBUserMFantasy{}
|
||||
if err = this.Get(uId, fantasy); err != nil && err != mgo.MongodbNil {
|
||||
func (this *modelUserMF) queryUsermfantasy(uId string) (info *pb.DBUserMFantasy, err error) {
|
||||
info = &pb.DBUserMFantasy{}
|
||||
if err = this.Get(uId, info); err != nil && err != mgo.MongodbNil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
}
|
||||
if err == mgo.MongodbNil {
|
||||
fantasy.Id = primitive.NewObjectID().Hex()
|
||||
fantasy.Uid = uId
|
||||
// fantasy.Mfantasys = make([]string, 0)
|
||||
if err = this.Add(uId, fantasy); err != nil {
|
||||
global := this.module.configure.GetGlobalConf()
|
||||
info = &pb.DBUserMFantasy{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Uid: uId,
|
||||
TriggerNum: 0,
|
||||
LastTrigger: 0,
|
||||
BuyNum: global.DreamlandFightnum,
|
||||
Ticket: global.DreamlandFightnum,
|
||||
Lastrtickettime: configure.Now().Unix(),
|
||||
}
|
||||
if err = this.Add(uId, info); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user