cmb
This commit is contained in:
parent
fcb3b028e0
commit
e18a7ec246
|
|
@ -33,9 +33,11 @@ func NewHTTPServer(
|
|||
})
|
||||
|
||||
r := srv.Route("/voucher")
|
||||
r.POST("/v1/wechat/notify", voucherService.WechatNotify)
|
||||
|
||||
cmb := r.Group("/cmb")
|
||||
cmb.POST("/v1/order", voucherService.CmbOrder)
|
||||
cmb.POST("/v1/query", voucherService.CmbQuery)
|
||||
cmb.POST("/v1/product_query", voucherService.CmbProductQuery)
|
||||
|
||||
return srv
|
||||
|
|
|
|||
|
|
@ -64,6 +64,10 @@ func (s *VoucherService) cmbOrder(ctx http.Context) (string, error) {
|
|||
return orderNo, nil
|
||||
}
|
||||
|
||||
func (s *VoucherService) CmbQuery(ctx http.Context) error {
|
||||
return ctx.JSON(200, nil)
|
||||
}
|
||||
|
||||
func (s *VoucherService) CmbProductQuery(ctx http.Context) error {
|
||||
|
||||
err := s.cmbProductQuery(ctx)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"github.com/go-kratos/kratos/v2/transport/http"
|
||||
)
|
||||
|
||||
func (s *VoucherService) WechatNotify(ctx http.Context) error {
|
||||
return ctx.JSON(200, nil)
|
||||
}
|
||||
Loading…
Reference in New Issue