fix:支付

This commit is contained in:
momo 2023-09-26 15:25:05 +08:00
parent ef522551e4
commit 821e36281a

View File

@ -268,6 +268,7 @@ func (d *defaultOrder) PaymentSuccessful(ctx context.Context, in *PaymentSuccess
StatusTitle: constants.OrderStatusMessage[statusCode], StatusTitle: constants.OrderStatusMessage[statusCode],
} }
statusLink = order.UpdateOrderStatusLink(ress.OrderDetailOriginal.OrderInfo.StatusLink, gmodel.OrderStatus{ statusLink = order.UpdateOrderStatusLink(ress.OrderDetailOriginal.OrderInfo.StatusLink, gmodel.OrderStatus{
Ctime: &ntime,
Utime: &ntime, Utime: &ntime,
StatusCode: statusCode, StatusCode: statusCode,
StatusTitle: constants.OrderStatusMessage[statusCode], StatusTitle: constants.OrderStatusMessage[statusCode],
@ -343,8 +344,7 @@ func (d *defaultOrder) PaymentSuccessful(ctx context.Context, in *PaymentSuccess
PayTitle: &payTitle, PayTitle: &payTitle,
}) })
// 更新订单信息 // 更新订单信息
var sql string = fmt.Sprintf(", `utime` = '%s'", ntime) var sql string = fmt.Sprintf(", `utime` = '%s', `pay_status` = %d", ntime, orderPayStatusCode)
uOrderDetail["pay_status"] = orderPayStatusCode
uOrderDetail["order_info"] = struct { uOrderDetail["order_info"] = struct {
Utime *time.Time `json:"utime"` Utime *time.Time `json:"utime"`
Status gmodel.OrderStatus `json:"status"` Status gmodel.OrderStatus `json:"status"`