go_dreamfactory/modules/exclusive/api_getlist.go
2024-02-26 18:41:09 +08:00

31 lines
707 B
Go

package exclusive
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
//参数校验
func (this *apiComp) GetlistCheck(session comm.IUserSession, req *pb.ExclusiveGetListReq) (errdata *pb.ErrorData) {
return
}
///获取用户装备列表
func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ExclusiveGetListReq) (errdata *pb.ErrorData) {
var (
list []*pb.DB_Exclusive
err error
)
if list, err = this.module.model.getExclusives(session.GetUserId()); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), "getlist", &pb.ExclusiveGetListResp{Exclusives: list})
return
}