Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
784a1c9106
@ -319,7 +319,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
|
||||
if req.DrawType != 1 {
|
||||
// 任务统计
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.modelDrawRecode.AddDrawRecord(session, szCards)
|
||||
this.module.modelDrawRecode.AddDrawRecord(session, req.DrawType, szCards)
|
||||
|
||||
var szHero []*pb.DBHero
|
||||
for _, hero := range add { // 奖励一次性发放
|
||||
|
@ -124,7 +124,7 @@ func (this *apiComp) SelectCard(session comm.IUserSession, req *pb.HeroSelectCar
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
|
||||
this.module.modelDrawRecode.AddDrawRecord(session, curSzCard)
|
||||
this.module.modelDrawRecode.AddDrawRecord(session, 1, curSzCard)
|
||||
|
||||
this.module.HeroLibrary(session, curSzCard, szHero)
|
||||
this.module.SendTaskMsg(session, szStar, 10, 1, curSzCard)
|
||||
|
@ -44,13 +44,13 @@ func (this *modelDrawRecode) Init(service core.IService, module core.IModule, co
|
||||
return
|
||||
}
|
||||
|
||||
func (this *modelDrawRecode) AddDrawRecord(session comm.IUserSession, curSzCard []string) {
|
||||
func (this *modelDrawRecode) AddDrawRecord(session comm.IUserSession, drawtype int32, curSzCard []string) {
|
||||
ExpireTime := time.Unix(configure.Now().Unix()+3*30*24*3600, 0)
|
||||
if _, err := this.DBModel.DB.InsertOne("drawrecode", &DBHeroDrawCardRecord{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Uid: session.GetUserId(),
|
||||
HeroId: curSzCard,
|
||||
Drawtype: 1,
|
||||
Drawtype: drawtype,
|
||||
Ctime: configure.Now().Unix(),
|
||||
ExpireAt: ExpireTime,
|
||||
}); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user