go_dreamfactory/modules/hunting/api_buy.go
2023-04-14 12:21:58 +08:00

22 lines
490 B
Go

package hunting
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
//参数校验
func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.HuntingBuyReq) (code pb.ErrorCode) {
if req.Count <= 0 {
code = pb.ErrorCode_ReqParameterError
return
}
return
}
func (this *apiComp) Buy(session comm.IUserSession, req *pb.HuntingBuyReq) (code pb.ErrorCode, data *pb.ErrorData) {
session.SendMsg(string(this.module.GetType()), HuntingBuyResp, &pb.HuntingBuyResp{})
return
}