go_dreamfactory/modules/hero/api_talentlist.go

28 lines
695 B
Go

package hero
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
//参数校验
func (this *apiComp) TalentListCheck(session comm.IUserSession, req *pb.HeroTalentListReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) TalentList(session comm.IUserSession, req *pb.HeroTalentListReq) (code pb.ErrorCode, data proto.Message) {
var (
err error
)
rsp := &pb.HeroTalentListResp{}
if rsp.Telnet, err = this.module.modelTalent.GetHerotalent(session.GetUserId()); err != nil {
fmt.Printf("GetHerotalenterr: %v\n", err)
//code = pb.ErrorCode_DBError
}
session.SendMsg(string(this.module.GetType()), HeroTalentListResp, rsp)
return
}