package library import ( "go_dreamfactory/comm" "go_dreamfactory/pb" ) //参数校验 func (this *apiComp) GetFetterListCheck(session comm.IUserSession, req *pb.LibraryGetFetterListReq) (code pb.ErrorCode) { return } func (this *apiComp) GetFetterList(session comm.IUserSession, req *pb.LibraryGetFetterListReq) (code pb.ErrorCode, data *pb.ErrorData) { code = this.GetFetterListCheck(session, req) if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 } rsp := &pb.LibraryGetFetterListResp{} rsp.Data = this.module.GetHeroFetterList(session.GetUserId()) session.SendMsg(string(this.module.GetType()), LibraryGetFetterListResp, rsp) return }