招募记录

This commit is contained in:
meixiongfeng 2024-01-05 16:18:53 +08:00
parent 3dfa4db7a3
commit 49465c8820
3 changed files with 4 additions and 4 deletions

View File

@ -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 { // 奖励一次性发放

View File

@ -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)

View File

@ -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 {