From 83dc607ec42e556e099abbfc9f3b503621949dbe Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Tue, 26 Sep 2023 15:29:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/repositories/order.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/service/repositories/order.go b/service/repositories/order.go index 0635c3b9..8d2cabda 100644 --- a/service/repositories/order.go +++ b/service/repositories/order.go @@ -343,8 +343,14 @@ func (d *defaultOrder) PaymentSuccessful(ctx context.Context, in *PaymentSuccess Utime: &ntime, PayTitle: &payTitle, }) + var sql string + if *orderInfo.Status == int64(constants.ORDERSTATUSUNPAIDDEPOSIT) { + sql = fmt.Sprintf(", `utime` = '%s', `pay_status` = %d, `status` = %d ", ntime, orderPayStatusCode, statusCode) + } else { + sql = fmt.Sprintf(", `utime` = '%s', `pay_status` = %d", ntime, orderPayStatusCode) + } + // 更新订单信息 - var sql string = fmt.Sprintf(", `utime` = '%s', `pay_status` = %d", ntime, orderPayStatusCode) uOrderDetail["order_info"] = struct { Utime *time.Time `json:"utime"` Status gmodel.OrderStatus `json:"status"`