35 lines
595 B
Go
35 lines
595 B
Go
package service
|
|
|
|
import (
|
|
"github.com/go-kratos/kratos/v2/transport/http"
|
|
v1 "voucher/api/v1"
|
|
)
|
|
|
|
func (s *VoucherService) CmbOrderMock(ctx http.Context) error {
|
|
|
|
var req v1.CmbOrderReply
|
|
if err := ctx.BindForm(&req); err != nil {
|
|
return err
|
|
}
|
|
|
|
reply := &v1.CmbRequest{}
|
|
|
|
return ctx.JSON(200, reply)
|
|
}
|
|
|
|
func (s *VoucherService) CmbProductQueryMock(ctx http.Context) error {
|
|
|
|
var req v1.CmbQueryProductRequest
|
|
if err := ctx.BindForm(&req); err != nil {
|
|
return err
|
|
}
|
|
|
|
if err := req.Validate(); err != nil {
|
|
return err
|
|
}
|
|
|
|
reply := &v1.CmbRequest{}
|
|
|
|
return ctx.JSON(200, reply)
|
|
}
|