diff --git a/internal/biz/cron_notice.go b/internal/biz/cron_notice.go index 9ba20ae..088de0a 100644 --- a/internal/biz/cron_notice.go +++ b/internal/biz/cron_notice.go @@ -117,10 +117,6 @@ func (v *VoucherBiz) notice(ctx context.Context, order *bo.OrderBo) error { return nil } - if err = v.UpdateOrderStatus(ctx, order.ID, status); err != nil { - return err - } - event, err := status.GetOrderNotifyEvent() if err != nil { return err @@ -134,7 +130,11 @@ func (v *VoucherBiz) notice(ctx context.Context, order *bo.OrderBo) error { Type: order.Type, } - return v.cmbNotice(ctx, order, orderNotify) + if err := v.cmbNotice(ctx, order, orderNotify); err != nil { + return err + } + + return v.UpdateOrderStatus(ctx, order.ID, status) } func (v *VoucherBiz) cmbNotice(ctx context.Context, order *bo.OrderBo, orderNotify *bo.OrderNotifyBo) error {