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