活动礼包
This commit is contained in:
parent
151a739dab
commit
d2c5c4f159
|
|
@ -156,10 +156,12 @@ func upJybUser(cjybuse, cjyb *mongo.Collection, snId, codeType int32, plt, useCo
|
||||||
if jybuser.JybInfos == nil {
|
if jybuser.JybInfos == nil {
|
||||||
jybuser.JybInfos = make(map[string]int32)
|
jybuser.JybInfos = make(map[string]int32)
|
||||||
} else if _, exist := jybuser.JybInfos[jybuseerid]; exist { // 该类型礼包玩家已经领取过
|
} else if _, exist := jybuser.JybInfos[jybuseerid]; exist { // 该类型礼包玩家已经领取过
|
||||||
|
if ret.CodeType != 3 {
|
||||||
return model.ErrJYBPlCode
|
return model.ErrJYBPlCode
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
jybuser.JybInfos[jybuseerid] = 1
|
jybuser.JybInfos[jybuseerid]++
|
||||||
|
|
||||||
err = cjybuse.Update(bson.M{"_id": jybuser.JybUserId}, bson.D{{"$set", bson.D{{"jybinfos", jybuser.JybInfos}}}})
|
err = cjybuse.Update(bson.M{"_id": jybuser.JybUserId}, bson.D{{"$set", bson.D{{"jybinfos", jybuser.JybInfos}}}})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ type JybInfo struct {
|
||||||
JybId bson.ObjectId `bson:"_id"` // 礼包ID
|
JybId bson.ObjectId `bson:"_id"` // 礼包ID
|
||||||
Platform string //平台
|
Platform string //平台
|
||||||
Name string // 礼包名称
|
Name string // 礼包名称
|
||||||
CodeType int32 // 礼包类型 1 通用 2 特殊
|
CodeType int32 // 礼包类型 1 通用 2专属(自动生成兑换码,每个玩家领一个) 3活动(自动生产兑换码,每个兑换码领一个)
|
||||||
StartTime int64 // 开始时间 Unix
|
StartTime int64 // 开始时间 Unix
|
||||||
EndTime int64 // 结束时间
|
EndTime int64 // 结束时间
|
||||||
Content string // 礼包内容
|
Content string // 礼包内容
|
||||||
|
|
|
||||||
|
|
@ -346,7 +346,7 @@ func (this *HundredSceneMgr) ModuleName() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *HundredSceneMgr) Init() {
|
func (this *HundredSceneMgr) Init() {
|
||||||
this.TryCreateRoom()
|
//this.TryCreateRoom()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *HundredSceneMgr) Update() {
|
func (this *HundredSceneMgr) Update() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue