From f348df322969e167e58bccd8626882aa2cfafc7d Mon Sep 17 00:00:00 2001 From: ziming Date: Mon, 20 Oct 2025 14:41:17 +0800 Subject: [PATCH] query1 order --- internal/biz/query.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/biz/query.go b/internal/biz/query.go index 6792131..83b24c6 100644 --- a/internal/biz/query.go +++ b/internal/biz/query.go @@ -79,12 +79,6 @@ func (this *VoucherBiz) QueryOrder(ctx context.Context, orderNo, isNotice string return "", err } - if order.Status != status { - if err = this.UpdateOrderStatus(ctx, order.ID, status); err != nil { - return "", err - } - } - notifyStr := "" if isNotice == "YES" { notify, err := this.Cmb.Notify(ctx, order) @@ -94,6 +88,12 @@ func (this *VoucherBiz) QueryOrder(ctx context.Context, orderNo, isNotice string notifyStr = fmt.Sprintf("通知招行成功:notify_id:%d", notify.ID) } + if order.Status != status { + if err = this.UpdateOrderStatus(ctx, order.ID, status); err != nil { + return "", err + } + } + return this.ToTextDescription(order, status, notifyStr), nil }