33 lines
955 B
Go
33 lines
955 B
Go
package viking
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
//参数校验
|
|
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.VikingGetListReq) (errdata *pb.ErrorData) {
|
|
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) GetList(session comm.IUserSession, req *pb.VikingGetListReq) (errdata *pb.ErrorData) {
|
|
code = this.GetListCheck(session, req)
|
|
if errdata != nil {
|
|
return // 参数校验失败直接返回
|
|
}
|
|
// 刷新挑战卷
|
|
// if code = this.module.ModuleItems.RecoverTicket(session); errdata != nil {
|
|
// return
|
|
// }
|
|
list, _ := this.module.modelViking.getVikingList(session.GetUserId())
|
|
|
|
// if session.GetUserId() != "" { // 恢复时间
|
|
// if userexpand, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil {
|
|
// list.RecoveryTime = userexpand.Recovertimeunifiedticket
|
|
// }
|
|
// }
|
|
session.SendMsg(string(this.module.GetType()), VikingGetListResp, &pb.VikingGetListResp{Data: list})
|
|
return
|
|
}
|