上传红点系统对接
This commit is contained in:
parent
c994874a18
commit
2527e10578
@ -23,6 +23,8 @@ type (
|
||||
Imail interface {
|
||||
CreateNewMail(session IUserSession, mail *pb.DBMailData) bool
|
||||
SendNewMail(mail *pb.DBMailData, uid ...string) bool // 批量发送邮件 支持跨服
|
||||
///红点
|
||||
IReddot
|
||||
}
|
||||
//道具背包接口
|
||||
IItems interface {
|
||||
|
@ -33,26 +33,34 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (code
|
||||
for k, v := range this.module.ModuleTask.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
case (comm.Reddot3):
|
||||
case comm.Reddot3:
|
||||
for k, v := range this.module.ModuleSociaty.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
case (comm.Reddot4):
|
||||
case comm.Reddot4:
|
||||
for k, v := range this.module.ModuleTask.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
case (comm.Reddot17):
|
||||
case comm.Reddot17:
|
||||
for k, v := range this.module.horoscope.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
case (comm.Reddot19):
|
||||
case comm.Reddot19:
|
||||
for k, v := range this.module.arena.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
case (comm.Reddot23), (comm.Reddot24), (comm.Reddot25):
|
||||
case comm.Reddot23, comm.Reddot24, comm.Reddot25:
|
||||
for k, v := range this.module.martialhall.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
case comm.Reddot20, comm.Reddot21, comm.Reddot22:
|
||||
for k, v := range this.module.gourmet.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
case comm.Reddot26:
|
||||
for k, v := range this.module.gourmet.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
}
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "get", &pb.ReddotGetAllResp{Reddot: reddot})
|
||||
|
@ -39,6 +39,12 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq)
|
||||
for k, v := range this.module.arena.Reddot(session, comm.Reddot19) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
for k, v := range this.module.gourmet.Reddot(session, comm.Reddot20, comm.Reddot21, comm.Reddot22) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
for k, v := range this.module.mail.Reddot(session, comm.Reddot26) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "getall", &pb.ReddotGetAllResp{Reddot: reddot})
|
||||
return
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ type Reddot struct {
|
||||
martialhall comm.IMartialhall
|
||||
horoscope comm.IHoroscope
|
||||
arena comm.IArena
|
||||
gourmet comm.IGourmet
|
||||
mail comm.Imail
|
||||
api_comp *apiComp
|
||||
}
|
||||
|
||||
@ -62,6 +64,14 @@ func (this *Reddot) Start() (err error) {
|
||||
return
|
||||
}
|
||||
this.arena = module.(comm.IArena)
|
||||
if module, err = this.service.GetModule(comm.ModuleGourmet); err != nil {
|
||||
return
|
||||
}
|
||||
this.gourmet = module.(comm.IGourmet)
|
||||
if module, err = this.service.GetModule(comm.ModuleMail); err != nil {
|
||||
return
|
||||
}
|
||||
this.mail = module.(comm.Imail)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user