diff --git a/internal/biz/wechat_retry.go b/internal/biz/wechat_retry.go index c5fe0c0..b8c15f1 100644 --- a/internal/biz/wechat_retry.go +++ b/internal/biz/wechat_retry.go @@ -8,9 +8,9 @@ import ( "voucher/internal/biz/bo" ) -func (v *VoucherBiz) PushWechatRetry(ctx context.Context, productNo string) error { +func (v *VoucherBiz) PushWechatRetry(ctx context.Context, batchNo string) error { - product, err := v.ProductRepo.GetByProductNo(ctx, productNo) + product, err := v.ProductRepo.GetByBatchNo(ctx, batchNo) if err != nil { return err } diff --git a/internal/server/http.go b/internal/server/http.go index 5bdbec5..5948356 100644 --- a/internal/server/http.go +++ b/internal/server/http.go @@ -38,10 +38,10 @@ func NewHTTPServer( srv.Route("/voucher/").POST("notifyRetry/{id}", cmb.NotifyRetry) srv.Route("/voucher/").POST("queryOrder/{order_no}", cmb.QueryOrder) - srv.Route("/voucher/").POST("registerTag/{product_no}", cmb.RegisterTag) + srv.Route("/voucher/").POST("registerTag/{batch_no}", cmb.RegisterTag) srv.Route("/voucher/").POST("pushWechatQuery", cmb.PushWechatQuery) srv.Route("/voucher/").POST("timeSliceQueryPush", cmb.TimeSliceQueryPush) - srv.Route("/voucher/").POST("pushWechatRetry/{product_no}", cmb.PushWechatRetry) + srv.Route("/voucher/").POST("pushWechatRetry/{batch_no}", cmb.PushWechatRetry) v1.RegisterCmbHTTPServer(srv, cmb) diff --git a/internal/service/script.go b/internal/service/script.go index a4cf1c4..e4083af 100644 --- a/internal/service/script.go +++ b/internal/service/script.go @@ -104,17 +104,17 @@ func (this *CmbService) TimeSliceQueryPush(ctx http.Context) error { func (this *CmbService) PushWechatRetry(ctx http.Context) error { - productNo := ctx.Vars().Get("product_no") - if productNo == "" { - return fmt.Errorf("product_no is empty") + batchNo := ctx.Vars().Get("batch_no") + if batchNo == "" { + return fmt.Errorf("batch_no is empty") } - err := this.VoucherBiz.PushWechatRetry(ctx, productNo) + err := this.VoucherBiz.PushWechatRetry(ctx, batchNo) if err != nil { return err } return ctx.JSON(http2.StatusOK, map[string]interface{}{ - "data": productNo, + "data": batchNo, }) }