31 lines
758 B
Go
31 lines
758 B
Go
package hero
|
|
|
|
import (
|
|
"fmt"
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
//参数校验
|
|
func (this *apiComp) TalentListCheck(session comm.IUserSession, req *pb.HeroTalentListReq) (errdata *pb.ErrorData) {
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) TalentList(session comm.IUserSession, req *pb.HeroTalentListReq) (errdata *pb.ErrorData) {
|
|
var (
|
|
err error
|
|
)
|
|
rsp := &pb.HeroTalentListResp{}
|
|
if rsp.Telnet, err = this.module.modelTalent.GetHerotalent(session.GetUserId()); err != nil {
|
|
fmt.Printf("GetHerotalenterr: %v\n", err)
|
|
errdata = &pb.ErrorData{
|
|
Code: pb.ErrorCode_DBError,
|
|
Title: pb.ErrorCode_DBError.ToString(),
|
|
Message: err.Error(),
|
|
}
|
|
return
|
|
}
|
|
session.SendMsg(string(this.module.GetType()), HeroTalentListResp, rsp)
|
|
return
|
|
}
|