Warnf
This commit is contained in:
parent
5e5c13d9dc
commit
4ca7aec637
|
|
@ -38,6 +38,7 @@ func NewHTTPServer(
|
||||||
|
|
||||||
srv.Route("/voucher/").POST("notifyRetry/{id}", cmb.NotifyRetry)
|
srv.Route("/voucher/").POST("notifyRetry/{id}", cmb.NotifyRetry)
|
||||||
srv.Route("/voucher/").POST("queryOrder/{order_no}", cmb.QueryOrder)
|
srv.Route("/voucher/").POST("queryOrder/{order_no}", cmb.QueryOrder)
|
||||||
|
srv.Route("/voucher/").POST("queryStock/{product_no}", cmb.QueryStock)
|
||||||
srv.Route("/voucher/").POST("registerTag/{batch_no}", cmb.RegisterTag)
|
srv.Route("/voucher/").POST("registerTag/{batch_no}", cmb.RegisterTag)
|
||||||
srv.Route("/voucher/").POST("pushWechatQuery", cmb.PushWechatQuery)
|
srv.Route("/voucher/").POST("pushWechatQuery", cmb.PushWechatQuery)
|
||||||
srv.Route("/voucher/").POST("timeSliceQueryPush", cmb.TimeSliceQueryPush)
|
srv.Route("/voucher/").POST("timeSliceQueryPush", cmb.TimeSliceQueryPush)
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,21 @@ func (this *CmbService) QueryOrder(ctx http.Context) error {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *CmbService) QueryStock(ctx http.Context) error {
|
||||||
|
|
||||||
|
no := ctx.Vars().Get("product_no")
|
||||||
|
if no == "" {
|
||||||
|
return fmt.Errorf("product_no is empty")
|
||||||
|
}
|
||||||
|
|
||||||
|
resp, err := this.VoucherBiz.CmbProductQuery(ctx, no)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return ctx.JSON(http2.StatusOK, resp)
|
||||||
|
}
|
||||||
|
|
||||||
func (this *CmbService) PushWechatQuery(ctx http.Context) error {
|
func (this *CmbService) PushWechatQuery(ctx http.Context) error {
|
||||||
|
|
||||||
bodyBytes, err := io.ReadAll(ctx.Request().Body)
|
bodyBytes, err := io.ReadAll(ctx.Request().Body)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue