26 lines
591 B
Go
26 lines
591 B
Go
package viking
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
//参数校验
|
|
func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.VikingBuyReq) (errdata *pb.ErrorData) {
|
|
if req.Count <= 0 {
|
|
errdata = &pb.ErrorData{
|
|
Code: pb.ErrorCode_ReqParameterError,
|
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
|
}
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
// 协议废弃 走通用字段
|
|
func (this *apiComp) Buy(session comm.IUserSession, req *pb.VikingBuyReq) (errdata *pb.ErrorData) {
|
|
|
|
session.SendMsg(string(this.module.GetType()), VikingBuyResp, &pb.VikingBuyResp{})
|
|
return
|
|
}
|