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

23 lines
528 B
Go

package enchant
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
//参数校验
func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.EnchantBuyReq) (code pb.ErrorCode) {
if req.Count <= 0 {
code = pb.ErrorCode_ReqParameterError
return
}
return
}
// 协议废除 走通用购买逻辑
func (this *apiComp) Buy(session comm.IUserSession, req *pb.EnchantBuyReq) (code pb.ErrorCode, data *pb.ErrorData) {
session.SendMsg(string(this.module.GetType()), EnchantBuyResp, &pb.EnchantBuyResp{})
return
}