|
|
@@ -40,6 +40,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.codec.EncoderException;
|
|
|
import org.apache.commons.codec.net.URLCodec;
|
|
|
import org.apache.commons.collections.MapUtils;
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.rocketmq.client.producer.SendResult;
|
|
|
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
|
|
@@ -201,6 +202,10 @@ public class OrderService {
|
|
|
if (user.getVipPurchase() - purchase <= 0) {
|
|
|
throw new BusinessException("vip名额已使用完毕!");
|
|
|
}
|
|
|
+ // vip扣除额度
|
|
|
+ if (ObjectUtils.isNotEmpty(collection.getVipQuota())) {
|
|
|
+ collectionService.decreaseQuota(collectionId, 1);
|
|
|
+ }
|
|
|
} else {
|
|
|
// long count = userRepo.countAllByCollectionIdAndCollectionInvitor(collectionId, userId);
|
|
|
// int sub = collection.getAssignment() - (int) count;
|