25 lines
564 B
Go
25 lines
564 B
Go
package hunting
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
//参数校验
|
|
func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.HuntingBuyReq) (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.HuntingBuyReq) (errdata *pb.ErrorData) {
|
|
|
|
session.SendMsg(string(this.module.GetType()), HuntingBuyResp, &pb.HuntingBuyResp{})
|
|
return
|
|
}
|