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