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