上传月子秘境挑战卷回复机制
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) {
|
func (this *modelUserMF) queryUsermfantasy(uId string) (info *pb.DBUserMFantasy, err error) {
|
||||||
fantasy = &pb.DBUserMFantasy{}
|
info = &pb.DBUserMFantasy{}
|
||||||
if err = this.Get(uId, fantasy); err != nil && err != mgo.MongodbNil {
|
if err = this.Get(uId, info); err != nil && err != mgo.MongodbNil {
|
||||||
this.module.Errorf("err:%v", err)
|
this.module.Errorf("err:%v", err)
|
||||||
}
|
}
|
||||||
if err == mgo.MongodbNil {
|
if err == mgo.MongodbNil {
|
||||||
fantasy.Id = primitive.NewObjectID().Hex()
|
global := this.module.configure.GetGlobalConf()
|
||||||
fantasy.Uid = uId
|
info = &pb.DBUserMFantasy{
|
||||||
// fantasy.Mfantasys = make([]string, 0)
|
Id: primitive.NewObjectID().Hex(),
|
||||||
if err = this.Add(uId, fantasy); err != nil {
|
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)
|
this.module.Errorf("err:%v", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
err = nil
|
err = nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user