29 lines
700 B
Go
29 lines
700 B
Go
package user
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
func (this *apiComp) GetTujianCheck(session comm.IUserSession, req *pb.UserGetTujianReq) (errdata *pb.ErrorData) {
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) GetTujian(session comm.IUserSession, req *pb.UserGetTujianReq) (errdata *pb.ErrorData) {
|
|
if code = this.GetTujianCheck(session, req); errdata != nil {
|
|
return
|
|
}
|
|
|
|
rsp := &pb.UserGetTujianResp{}
|
|
list := this.module.ModuleHero.GetHeroList(session.GetUserId())
|
|
for _, v := range list {
|
|
rsp.Heroids = append(rsp.Heroids, v.HeroID)
|
|
}
|
|
|
|
err := session.SendMsg(string(this.module.GetType()), UserGetTujianResp, rsp)
|
|
if err != nil {
|
|
code = pb.ErrorCode_SystemError
|
|
}
|
|
return
|
|
}
|