|
|
@@ -202,6 +202,10 @@ public class UserService {
|
|
|
if (point <= 0) {
|
|
|
long count = userRepo.countAllByCollectionIdAndCollectionInvitor(collectionId, invitor);
|
|
|
if (count >= collection.getAssignment()) {
|
|
|
+ // 扣除藏品额度
|
|
|
+ if (ObjectUtils.isNotEmpty(collection.getVipQuota())) {
|
|
|
+ collectionService.decreaseQuota(collectionId, 1);
|
|
|
+ }
|
|
|
userRepo.updateVipPoint(invitor, 1);
|
|
|
pointRecordRepo.save(PointRecord.builder()
|
|
|
.collectionId(collectionId)
|
|
|
@@ -209,10 +213,7 @@ public class UserService {
|
|
|
.type("VIP_POINT")
|
|
|
.point(1)
|
|
|
.build());
|
|
|
- // 扣除藏品额度
|
|
|
- if (ObjectUtils.isNotEmpty(collection.getVipQuota())) {
|
|
|
- collectionService.decreaseQuota(collectionId, 1);
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|