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"`