38 lines
859 B
Go
38 lines
859 B
Go
package jielong
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
// 参数校验
|
|
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.JielongGetListReq) (errdata *pb.ErrorData) {
|
|
|
|
return
|
|
}
|
|
|
|
// /获取自己的排行榜信息
|
|
func (this *apiComp) GetList(session comm.IUserSession, req *pb.JielongGetListReq) (errdata *pb.ErrorData) {
|
|
var (
|
|
list *pb.DBJielongData
|
|
err error
|
|
)
|
|
if errdata = this.GetListCheck(session, req); errdata != nil {
|
|
return
|
|
}
|
|
|
|
list, err = this.module.modelJielong.getUserJielongData(session.GetUserId())
|
|
if err != nil {
|
|
errdata = &pb.ErrorData{
|
|
Code: pb.ErrorCode_ReqParameterError,
|
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
|
Message: err.Error(),
|
|
}
|
|
return
|
|
}
|
|
session.SendMsg(string(this.module.GetType()), "getlist", &pb.JielongGetListResp{
|
|
Data: list,
|
|
})
|
|
return
|
|
}
|