This commit is contained in:
@@ -534,7 +534,7 @@ func (l *AttachTransactionLogic) validateOrderTradeNoBinding(orderInfo *ordermod
|
||||
var boundOrder ordermodel.Order
|
||||
err := l.svcCtx.DB.WithContext(l.ctx).
|
||||
Model(&ordermodel.Order{}).
|
||||
Where("trade_no IN ? AND order_no <> ? AND status IN ?", tradeNoCandidates, orderInfo.OrderNo, []uint8{orderStatusPaid, orderStatusFinished}).
|
||||
Where("trade_no IN ? AND order_no <> ? AND status IN ?", tradeNoCandidates, orderInfo.OrderNo, []int64{int64(orderStatusPaid), int64(orderStatusFinished)}).
|
||||
Order("id DESC").
|
||||
First(&boundOrder).Error
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
|
||||
Reference in New Issue
Block a user