map对齐
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m29s
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m29s
This commit is contained in:
parent
1e14e2dbd9
commit
94f5d0c07d
@ -534,7 +534,7 @@ func (l *AttachTransactionLogic) validateOrderTradeNoBinding(orderInfo *ordermod
|
|||||||
var boundOrder ordermodel.Order
|
var boundOrder ordermodel.Order
|
||||||
err := l.svcCtx.DB.WithContext(l.ctx).
|
err := l.svcCtx.DB.WithContext(l.ctx).
|
||||||
Model(&ordermodel.Order{}).
|
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").
|
Order("id DESC").
|
||||||
First(&boundOrder).Error
|
First(&boundOrder).Error
|
||||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
|
|||||||
@ -117,7 +117,7 @@ func (l *PreCreateOrderLogic) PreCreateOrder(req *types.PurchaseOrderRequest) (r
|
|||||||
var historyCount int64
|
var historyCount int64
|
||||||
if e := l.svcCtx.DB.Model(&order.Order{}).
|
if e := l.svcCtx.DB.Model(&order.Order{}).
|
||||||
Where("user_id = ? AND subscribe_id = ? AND type = 1 AND status IN ?",
|
Where("user_id = ? AND subscribe_id = ? AND type = 1 AND status IN ?",
|
||||||
u.Id, targetSubscribeID, []uint8{2, 5}).
|
u.Id, targetSubscribeID, []int64{2, 5}).
|
||||||
Count(&historyCount).Error; e != nil {
|
Count(&historyCount).Error; e != nil {
|
||||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DatabaseQueryError), "check new user purchase history error: %v", e.Error())
|
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DatabaseQueryError), "check new user purchase history error: %v", e.Error())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user