29 lines
719 B
Go
29 lines
719 B
Go
package library
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
//参数校验
|
|
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 proto.Message) {
|
|
|
|
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
|
|
}
|