fix(order): prevent duplicate subscriptions and repair invite gifts
Build docker and publish / build (20.15.1) (push) Successful in 5m6s
Build docker and publish / build (20.15.1) (push) Successful in 5m6s
This commit is contained in:
@@ -43,7 +43,7 @@ func validateNewUserOnlyEligibilityAtActivation(
|
||||
ctx,
|
||||
db,
|
||||
eligibility.ScopeUserIDs,
|
||||
orderInfo.SubscribeId,
|
||||
0,
|
||||
[]int64{OrderStatusFinished},
|
||||
orderInfo.OrderNo,
|
||||
)
|
||||
@@ -51,7 +51,7 @@ func validateNewUserOnlyEligibilityAtActivation(
|
||||
return fmt.Errorf("new user only: check history error: %w", err)
|
||||
}
|
||||
if historyCount >= 1 {
|
||||
return fmt.Errorf("new user only: user %d already activated subscribe %d", orderInfo.UserId, orderInfo.SubscribeId)
|
||||
return fmt.Errorf("new user only: user %d already activated an order", orderInfo.UserId)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user