32 lines
837 B
Go
32 lines
837 B
Go
package equipment
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
//参数校验
|
|
func (this *apiComp) GetlistCheck(session comm.IUserSession, req *pb.EquipmentGetListReq) (errdata *pb.ErrorData) {
|
|
|
|
return
|
|
}
|
|
|
|
///获取用户装备列表
|
|
func (this *apiComp) Getlist(session comm.IUserSession, req *pb.EquipmentGetListReq) (errdata *pb.ErrorData) {
|
|
var (
|
|
err error
|
|
items []*pb.DB_Equipment
|
|
)
|
|
if items, err = this.module.modelEquipment.QueryUserEquipments(session.GetUserId()); err != nil {
|
|
this.module.Errorf("QueryUserPackReq err:%v", err)
|
|
errdata = &pb.ErrorData{
|
|
Code: pb.ErrorCode_CacheReadError,
|
|
Title: pb.ErrorCode_CacheReadError.ToString(),
|
|
Message: err.Error(),
|
|
}
|
|
return
|
|
}
|
|
session.SendMsg(string(this.module.GetType()), "getlist", &pb.EquipmentGetListResp{Equipments: items})
|
|
return
|
|
}
|