|
@@ -69,10 +69,11 @@ func CreateTradeOrder(userId, templateUserId int, productOrderNo, tradeOrderNo,
|
|
|
logger.Error("创建支付订单失败%v", err)
|
|
|
return
|
|
|
}
|
|
|
- productOrder.TradeID = tradeOrder.ID
|
|
|
- productOrder.TradeNO = tradeOrder.TransactionID
|
|
|
- productOrder.PaymentTime = time.Now()
|
|
|
- err = tx.Save(productOrder).Error
|
|
|
+ err = tx.Updates(map[string]interface{}{
|
|
|
+ "trade_id": tradeOrder.ID,
|
|
|
+ "trade_no": tradeOrder.TransactionID,
|
|
|
+ "payment_time": time.Now(),
|
|
|
+ }).Error
|
|
|
return
|
|
|
}
|
|
|
func convertToDTO(tradeOrder order.TradeOrder) TradeOrderDTO {
|