fix:支付

This commit is contained in:
momo 2023-09-26 15:29:33 +08:00
parent 821e36281a
commit 83dc607ec4

View File

@ -343,8 +343,14 @@ func (d *defaultOrder) PaymentSuccessful(ctx context.Context, in *PaymentSuccess
Utime: &ntime, Utime: &ntime,
PayTitle: &payTitle, 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 { uOrderDetail["order_info"] = struct {
Utime *time.Time `json:"utime"` Utime *time.Time `json:"utime"`
Status gmodel.OrderStatus `json:"status"` Status gmodel.OrderStatus `json:"status"`