22 lines
490 B
Go
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
|
|
}
|