This commit is contained in:
李子铭 2025-03-04 18:14:52 +08:00
parent fcb3b028e0
commit e18a7ec246
3 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)
}