|
|
@@ -278,6 +278,8 @@ public class CollectionService {
|
|
|
}
|
|
|
|
|
|
public BlindBoxItem draw(Long collectionId) {
|
|
|
+ log.info("开始盲盒抽卡 {}", collectionId);
|
|
|
+ long t = System.currentTimeMillis();
|
|
|
List<BlindBoxItem> items = blindBoxItemRepo.findByBlindBoxId(collectionId);
|
|
|
|
|
|
Map<BlindBoxItem, Range<Integer>> randomRange = new HashMap<>();
|
|
|
@@ -328,6 +330,7 @@ public class CollectionService {
|
|
|
winItem.setStock(winItem.getStock() - 1);
|
|
|
winItem.setSale(winItem.getSale() + 1);
|
|
|
blindBoxItemRepo.save(winItem);
|
|
|
+ log.info("盲盒抽卡成功 {}ms", System.currentTimeMillis() - t);
|
|
|
return winItem;
|
|
|
}
|
|
|
|