go_dreamfactory/modules/library/api_getfetterlist.go

26 lines
682 B
Go

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) {
if code = this.GetFetterListCheck(session, req); code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
rsp := &pb.LibraryGetFetterListResp{}
rsp.Data = this.module.GetHeroFetterList(session.GetUserId())
session.SendMsg(string(this.module.GetType()), LibraryGetFetterListResp, rsp)
return
}