32 lines
741 B
Go
32 lines
741 B
Go
package library
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
//参数校验
|
|
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.DBHero) (code pb.ErrorCode) {
|
|
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) GetList(session comm.IUserSession, req *pb.DBHero) (code pb.ErrorCode, data proto.Message) {
|
|
|
|
code = this.GetListCheck(session, req)
|
|
if code != pb.ErrorCode_Success {
|
|
return // 参数校验失败直接返回
|
|
}
|
|
|
|
// list, err := this.module.modelLibrary.getLibraryList(session.GetUserId())
|
|
// if err != nil {
|
|
// code = pb.ErrorCode_DBError
|
|
// return
|
|
// }
|
|
|
|
//session.SendMsg(string(this.module.GetType()), LibraryGetListResp, &pb.LibraryGetListResp{Data: list})
|
|
return
|
|
}
|