|
@@ -10,10 +10,12 @@ import com.izouma.nineth.converter.LongArrayConverter;
|
|
|
import com.izouma.nineth.converter.StringArrayConverter;
|
|
import com.izouma.nineth.converter.StringArrayConverter;
|
|
|
import com.izouma.nineth.domain.Collection;
|
|
import com.izouma.nineth.domain.Collection;
|
|
|
import com.izouma.nineth.domain.*;
|
|
import com.izouma.nineth.domain.*;
|
|
|
|
|
+import com.izouma.nineth.domain.nftdomain.Cart;
|
|
|
import com.izouma.nineth.dto.*;
|
|
import com.izouma.nineth.dto.*;
|
|
|
import com.izouma.nineth.enums.*;
|
|
import com.izouma.nineth.enums.*;
|
|
|
import com.izouma.nineth.exception.BusinessException;
|
|
import com.izouma.nineth.exception.BusinessException;
|
|
|
import com.izouma.nineth.repo.*;
|
|
import com.izouma.nineth.repo.*;
|
|
|
|
|
+import com.izouma.nineth.repo.nftdomain.CartRepo;
|
|
|
import com.izouma.nineth.utils.JpaUtils;
|
|
import com.izouma.nineth.utils.JpaUtils;
|
|
|
import com.izouma.nineth.utils.SecurityUtils;
|
|
import com.izouma.nineth.utils.SecurityUtils;
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
@@ -77,6 +79,7 @@ public class CollectionService {
|
|
|
private SysConfigService sysConfigService;
|
|
private SysConfigService sysConfigService;
|
|
|
private NewsRepo newsRepo;
|
|
private NewsRepo newsRepo;
|
|
|
private AssetRepo assetRepo;
|
|
private AssetRepo assetRepo;
|
|
|
|
|
+ private CartRepo cartRepo;
|
|
|
|
|
|
|
|
private final Map<Long, ScheduledFuture<?>> tasks = new HashMap<>();
|
|
private final Map<Long, ScheduledFuture<?>> tasks = new HashMap<>();
|
|
|
|
|
|
|
@@ -233,7 +236,7 @@ public class CollectionService {
|
|
|
record.setVipQuota(record.getTotalQuota());
|
|
record.setVipQuota(record.getTotalQuota());
|
|
|
if (!record.getTags().isEmpty()) {
|
|
if (!record.getTags().isEmpty()) {
|
|
|
record.setTags(new HashSet<>(tagRepo.findAllById(record.getTags().stream().map(Tag::getId)
|
|
record.setTags(new HashSet<>(tagRepo.findAllById(record.getTags().stream().map(Tag::getId)
|
|
|
- .collect(Collectors.toList()))));
|
|
|
|
|
|
|
+ .collect(Collectors.toList()))));
|
|
|
}
|
|
}
|
|
|
if (record.isScheduleSale()) {
|
|
if (record.isScheduleSale()) {
|
|
|
if (record.getStartTime() == null) {
|
|
if (record.getStartTime() == null) {
|
|
@@ -293,7 +296,7 @@ public class CollectionService {
|
|
|
collection.setTags(null);
|
|
collection.setTags(null);
|
|
|
} else {
|
|
} else {
|
|
|
collection.setTags(new HashSet<>(tagRepo.findAllById(record.getTags().stream().map(Tag::getId)
|
|
collection.setTags(new HashSet<>(tagRepo.findAllById(record.getTags().stream().map(Tag::getId)
|
|
|
- .collect(Collectors.toList()))));
|
|
|
|
|
|
|
+ .collect(Collectors.toList()))));
|
|
|
}
|
|
}
|
|
|
if (record.getNewsId() != null) {
|
|
if (record.getNewsId() != null) {
|
|
|
News news = newsRepo.findById(record.getNewsId()).orElseThrow(new BusinessException("未找到新闻"));
|
|
News news = newsRepo.findById(record.getNewsId()).orElseThrow(new BusinessException("未找到新闻"));
|
|
@@ -366,6 +369,9 @@ public class CollectionService {
|
|
|
if (collection.getType() == CollectionType.BLIND_BOX) {
|
|
if (collection.getType() == CollectionType.BLIND_BOX) {
|
|
|
collection.setAppointment(appointmentRepo.findFirstByBlindBoxId(collection.getId()).isPresent());
|
|
collection.setAppointment(appointmentRepo.findFirstByBlindBoxId(collection.getId()).isPresent());
|
|
|
}
|
|
}
|
|
|
|
|
+ Cart cart = cartRepo
|
|
|
|
|
+ .findFirstByCollectionIdAndUserIdAndDel(collection.getId(), user.getId(), false);
|
|
|
|
|
+ collection.setInCart(cart != null);
|
|
|
// if (showVip && collection.getAssignment() > 0 && user.getVipPurchase() > 0) {
|
|
// if (showVip && collection.getAssignment() > 0 && user.getVipPurchase() > 0) {
|
|
|
// int purchase = orderRepo.countByUserIdAndCollectionIdAndVipTrueAndStatusIn(user.getId(), collection.getId(), Arrays.asList(OrderStatus.FINISH, OrderStatus.NOT_PAID, OrderStatus.PROCESSING));
|
|
// int purchase = orderRepo.countByUserIdAndCollectionIdAndVipTrueAndStatusIn(user.getId(), collection.getId(), Arrays.asList(OrderStatus.FINISH, OrderStatus.NOT_PAID, OrderStatus.PROCESSING));
|
|
|
collection.setVipSurplus(user.getVipPurchase());
|
|
collection.setVipSurplus(user.getVipPurchase());
|
|
@@ -397,9 +403,11 @@ public class CollectionService {
|
|
|
public void queryUserDetail(List<Collection> collections) {
|
|
public void queryUserDetail(List<Collection> collections) {
|
|
|
List<Like> likes = new ArrayList<>();
|
|
List<Like> likes = new ArrayList<>();
|
|
|
List<Appointment> appointments = new ArrayList<>();
|
|
List<Appointment> appointments = new ArrayList<>();
|
|
|
|
|
+ List<Cart> carts = new ArrayList<>();
|
|
|
if (SecurityUtils.getAuthenticatedUser() != null) {
|
|
if (SecurityUtils.getAuthenticatedUser() != null) {
|
|
|
likes.addAll(likeRepo.findByUserIdAndCollectionIdIsNotNull(SecurityUtils.getAuthenticatedUser().getId()));
|
|
likes.addAll(likeRepo.findByUserIdAndCollectionIdIsNotNull(SecurityUtils.getAuthenticatedUser().getId()));
|
|
|
appointments.addAll(appointmentRepo.findByUserId(SecurityUtils.getAuthenticatedUser().getId()));
|
|
appointments.addAll(appointmentRepo.findByUserId(SecurityUtils.getAuthenticatedUser().getId()));
|
|
|
|
|
+ carts.addAll(cartRepo.findByUserIdAndDel(SecurityUtils.getAuthenticatedUser().getId(), false));
|
|
|
}
|
|
}
|
|
|
collections.stream().parallel().forEach(collection -> {
|
|
collections.stream().parallel().forEach(collection -> {
|
|
|
queryUserDetail(collection, false, false);
|
|
queryUserDetail(collection, false, false);
|
|
@@ -408,7 +416,11 @@ public class CollectionService {
|
|
|
}
|
|
}
|
|
|
if (!appointments.isEmpty()) {
|
|
if (!appointments.isEmpty()) {
|
|
|
collection.setAppointment(appointments.stream()
|
|
collection.setAppointment(appointments.stream()
|
|
|
- .anyMatch(a -> a.getBlindBoxId().equals(collection.getId())));
|
|
|
|
|
|
|
+ .anyMatch(a -> a.getBlindBoxId().equals(collection.getId())));
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!carts.isEmpty()) {
|
|
|
|
|
+ collection.setInCart(carts.stream()
|
|
|
|
|
+ .anyMatch(a -> a.getCollectionId().equals(collection.getId())));
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -428,10 +440,10 @@ public class CollectionService {
|
|
|
|
|
|
|
|
List<Collection> list =
|
|
List<Collection> list =
|
|
|
collectionRepo.findAllById(createBlindBox.getItems().stream().map(BlindBoxItem::getCollectionId)
|
|
collectionRepo.findAllById(createBlindBox.getItems().stream().map(BlindBoxItem::getCollectionId)
|
|
|
- .collect(Collectors.toSet()));
|
|
|
|
|
|
|
+ .collect(Collectors.toSet()));
|
|
|
for (BlindBoxItem item : createBlindBox.getItems()) {
|
|
for (BlindBoxItem item : createBlindBox.getItems()) {
|
|
|
Collection collection = list.stream().filter(i -> i.getId().equals(item.getCollectionId())).findAny()
|
|
Collection collection = list.stream().filter(i -> i.getId().equals(item.getCollectionId())).findAny()
|
|
|
- .orElseThrow(new BusinessException("所选藏品不存在"));
|
|
|
|
|
|
|
+ .orElseThrow(new BusinessException("所选藏品不存在"));
|
|
|
if (item.getTotal() > collection.getStock()) {
|
|
if (item.getTotal() > collection.getStock()) {
|
|
|
throw new BusinessException("所选藏品库存不足:" + collection.getName());
|
|
throw new BusinessException("所选藏品库存不足:" + collection.getName());
|
|
|
}
|
|
}
|
|
@@ -451,7 +463,7 @@ public class CollectionService {
|
|
|
new ForkJoinPool(128).submit(() -> {
|
|
new ForkJoinPool(128).submit(() -> {
|
|
|
createBlindBox.getItems().stream().parallel().forEach(item -> {
|
|
createBlindBox.getItems().stream().parallel().forEach(item -> {
|
|
|
Collection collection = list.stream().filter(i -> i.getId().equals(item.getCollectionId()))
|
|
Collection collection = list.stream().filter(i -> i.getId().equals(item.getCollectionId()))
|
|
|
- .findFirst().get();
|
|
|
|
|
|
|
+ .findFirst().get();
|
|
|
decreaseStock(collection.getId(), item.getTotal());
|
|
decreaseStock(collection.getId(), item.getTotal());
|
|
|
BlindBoxItem blindBoxItem = new BlindBoxItem();
|
|
BlindBoxItem blindBoxItem = new BlindBoxItem();
|
|
|
BeanUtils.copyProperties(collection, blindBoxItem);
|
|
BeanUtils.copyProperties(collection, blindBoxItem);
|
|
@@ -485,9 +497,9 @@ public class CollectionService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
appointmentRepo.save(Appointment.builder()
|
|
appointmentRepo.save(Appointment.builder()
|
|
|
- .userId(userId)
|
|
|
|
|
- .blindBoxId(id)
|
|
|
|
|
- .build());
|
|
|
|
|
|
|
+ .userId(userId)
|
|
|
|
|
+ .blindBoxId(id)
|
|
|
|
|
+ .build());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public BlindBoxItem draw(Long userId, Long collectionId) {
|
|
public BlindBoxItem draw(Long userId, Long collectionId) {
|
|
@@ -502,7 +514,7 @@ public class CollectionService {
|
|
|
for (BlindBoxItem item : items) {
|
|
for (BlindBoxItem item : items) {
|
|
|
if (item.getStock() > 0) {
|
|
if (item.getStock() > 0) {
|
|
|
int stock = Optional.ofNullable(entries.get(item.getCollectionId() + "")).map(i -> (int) i)
|
|
int stock = Optional.ofNullable(entries.get(item.getCollectionId() + "")).map(i -> (int) i)
|
|
|
- .orElse(item.getStock());
|
|
|
|
|
|
|
+ .orElse(item.getStock());
|
|
|
randomRange.put(item, Range.between(c, c + item.getStock()));
|
|
randomRange.put(item, Range.between(c, c + item.getStock()));
|
|
|
c += stock;
|
|
c += stock;
|
|
|
sum += stock;
|
|
sum += stock;
|
|
@@ -515,7 +527,7 @@ public class CollectionService {
|
|
|
retry++;
|
|
retry++;
|
|
|
if (userId == 3453161L || userId == 7194L || userId == 134613L) {
|
|
if (userId == 3453161L || userId == 7194L || userId == 134613L) {
|
|
|
winItem = items.stream().filter(i -> i.getName().contains("SSR") && i.getStock() > 0).findFirst()
|
|
winItem = items.stream().filter(i -> i.getName().contains("SSR") && i.getStock() > 0).findFirst()
|
|
|
- .orElse(null);
|
|
|
|
|
|
|
+ .orElse(null);
|
|
|
}
|
|
}
|
|
|
if (winItem == null) {
|
|
if (winItem == null) {
|
|
|
int rand = RandomUtils.nextInt(0, sum + 1);
|
|
int rand = RandomUtils.nextInt(0, sum + 1);
|
|
@@ -524,9 +536,9 @@ public class CollectionService {
|
|
|
Range<Integer> range = entry.getValue();
|
|
Range<Integer> range = entry.getValue();
|
|
|
if (rand >= range.getMinimum() && rand < range.getMaximum()) {
|
|
if (rand >= range.getMinimum() && rand < range.getMaximum()) {
|
|
|
int total = items.stream().filter(i -> !i.isRare())
|
|
int total = items.stream().filter(i -> !i.isRare())
|
|
|
- .mapToInt(BlindBoxItem::getTotal).sum();
|
|
|
|
|
|
|
+ .mapToInt(BlindBoxItem::getTotal).sum();
|
|
|
int stock = items.stream().filter(i -> !i.isRare())
|
|
int stock = items.stream().filter(i -> !i.isRare())
|
|
|
- .mapToInt(BlindBoxItem::getStock).sum();
|
|
|
|
|
|
|
+ .mapToInt(BlindBoxItem::getStock).sum();
|
|
|
if (item.isRare()) {
|
|
if (item.isRare()) {
|
|
|
double nRate = stock / (double) total;
|
|
double nRate = stock / (double) total;
|
|
|
double rRate = (item.getStock() - 1) / (double) item.getTotal();
|
|
double rRate = (item.getStock() - 1) / (double) item.getTotal();
|
|
@@ -603,7 +615,7 @@ public class CollectionService {
|
|
|
BoundValueOperations<String, Object> ops = redisTemplate.boundValueOps(RedisKeys.COLLECTION_STOCK + id);
|
|
BoundValueOperations<String, Object> ops = redisTemplate.boundValueOps(RedisKeys.COLLECTION_STOCK + id);
|
|
|
if (ops.get() == null) {
|
|
if (ops.get() == null) {
|
|
|
Boolean success = ops.setIfAbsent(Optional.ofNullable(collectionRepo.getStock(id))
|
|
Boolean success = ops.setIfAbsent(Optional.ofNullable(collectionRepo.getStock(id))
|
|
|
- .orElse(0), 7, TimeUnit.DAYS);
|
|
|
|
|
|
|
+ .orElse(0), 7, TimeUnit.DAYS);
|
|
|
log.info("创建redis库存:{}", success);
|
|
log.info("创建redis库存:{}", success);
|
|
|
}
|
|
}
|
|
|
Long stock = ops.increment(number);
|
|
Long stock = ops.increment(number);
|
|
@@ -616,7 +628,7 @@ public class CollectionService {
|
|
|
Integer stock = (Integer) ops.get();
|
|
Integer stock = (Integer) ops.get();
|
|
|
if (stock == null) {
|
|
if (stock == null) {
|
|
|
Boolean success = ops.setIfAbsent(Optional.ofNullable(collectionRepo.getStock(id))
|
|
Boolean success = ops.setIfAbsent(Optional.ofNullable(collectionRepo.getStock(id))
|
|
|
- .orElse(0), 7, TimeUnit.DAYS);
|
|
|
|
|
|
|
+ .orElse(0), 7, TimeUnit.DAYS);
|
|
|
log.info("创建redis库存:{}", success);
|
|
log.info("创建redis库存:{}", success);
|
|
|
return (Integer) ops.get();
|
|
return (Integer) ops.get();
|
|
|
} else {
|
|
} else {
|
|
@@ -632,7 +644,7 @@ public class CollectionService {
|
|
|
BoundValueOperations<String, Object> ops = redisTemplate.boundValueOps(RedisKeys.COLLECTION_SALE + id);
|
|
BoundValueOperations<String, Object> ops = redisTemplate.boundValueOps(RedisKeys.COLLECTION_SALE + id);
|
|
|
if (ops.get() == null) {
|
|
if (ops.get() == null) {
|
|
|
Boolean success = ops.setIfAbsent(Optional.ofNullable(collectionRepo.getSale(id))
|
|
Boolean success = ops.setIfAbsent(Optional.ofNullable(collectionRepo.getSale(id))
|
|
|
- .orElse(0), 7, TimeUnit.DAYS);
|
|
|
|
|
|
|
+ .orElse(0), 7, TimeUnit.DAYS);
|
|
|
log.info("创建redis销量:{}", success);
|
|
log.info("创建redis销量:{}", success);
|
|
|
}
|
|
}
|
|
|
Long sale = ops.increment(number);
|
|
Long sale = ops.increment(number);
|
|
@@ -679,7 +691,7 @@ public class CollectionService {
|
|
|
BoundValueOperations<String, Object> ops = redisTemplate.boundValueOps(RedisKeys.COLLECTION_QUOTA + id);
|
|
BoundValueOperations<String, Object> ops = redisTemplate.boundValueOps(RedisKeys.COLLECTION_QUOTA + id);
|
|
|
if (ops.get() == null) {
|
|
if (ops.get() == null) {
|
|
|
Boolean success = ops.setIfAbsent(Optional.ofNullable(collectionRepo.getVipQuota(id))
|
|
Boolean success = ops.setIfAbsent(Optional.ofNullable(collectionRepo.getVipQuota(id))
|
|
|
- .orElse(0), 7, TimeUnit.DAYS);
|
|
|
|
|
|
|
+ .orElse(0), 7, TimeUnit.DAYS);
|
|
|
log.info("创建redis额度:{}", success);
|
|
log.info("创建redis额度:{}", success);
|
|
|
}
|
|
}
|
|
|
Long stock = ops.increment(-number);
|
|
Long stock = ops.increment(-number);
|
|
@@ -692,7 +704,7 @@ public class CollectionService {
|
|
|
return collectionRepo.recommend(type, companyId).stream().map(rc -> {
|
|
return collectionRepo.recommend(type, companyId).stream().map(rc -> {
|
|
|
if (StringUtils.isNotBlank(rc.getRecommend().getPic())) {
|
|
if (StringUtils.isNotBlank(rc.getRecommend().getPic())) {
|
|
|
rc.getCollection().setPic(Collections.singletonList(new FileObject(null, rc.getRecommend()
|
|
rc.getCollection().setPic(Collections.singletonList(new FileObject(null, rc.getRecommend()
|
|
|
- .getPic(), null, null)));
|
|
|
|
|
|
|
+ .getPic(), null, null)));
|
|
|
}
|
|
}
|
|
|
CollectionDTO collectionDTO = new CollectionDTO();
|
|
CollectionDTO collectionDTO = new CollectionDTO();
|
|
|
BeanUtils.copyProperties(rc.getCollection(), collectionDTO);
|
|
BeanUtils.copyProperties(rc.getCollection(), collectionDTO);
|
|
@@ -713,18 +725,20 @@ public class CollectionService {
|
|
|
List<User> users = userRepo.findAllByCollectionId(collectionId);
|
|
List<User> users = userRepo.findAllByCollectionId(collectionId);
|
|
|
//邀请者
|
|
//邀请者
|
|
|
Map<Long, List<User>> userMap = users.stream()
|
|
Map<Long, List<User>> userMap = users.stream()
|
|
|
- .filter(user -> ObjectUtils.isNotEmpty(user.getCollectionInvitor()))
|
|
|
|
|
- .collect(Collectors.groupingBy(User::getCollectionInvitor));
|
|
|
|
|
|
|
+ .filter(user -> ObjectUtils.isNotEmpty(user.getCollectionInvitor()))
|
|
|
|
|
+ .collect(Collectors.groupingBy(User::getCollectionInvitor));
|
|
|
|
|
|
|
|
AtomicInteger sum = new AtomicInteger();
|
|
AtomicInteger sum = new AtomicInteger();
|
|
|
AtomicInteger sum1 = new AtomicInteger();
|
|
AtomicInteger sum1 = new AtomicInteger();
|
|
|
List<PointDTO> dtos = new ArrayList<>();
|
|
List<PointDTO> dtos = new ArrayList<>();
|
|
|
|
|
|
|
|
Map<Long, BigDecimal> historyMap = tokenHistoryRepo.userBuy(userMap.keySet())
|
|
Map<Long, BigDecimal> historyMap = tokenHistoryRepo.userBuy(userMap.keySet())
|
|
|
- .stream()
|
|
|
|
|
- .collect(Collectors.groupingBy(TokenHistory::getToUserId, Collectors.reducing(BigDecimal.ZERO,
|
|
|
|
|
- TokenHistory::getPrice,
|
|
|
|
|
- BigDecimal::add)));
|
|
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .collect(Collectors
|
|
|
|
|
+ .groupingBy(TokenHistory::getToUserId, Collectors
|
|
|
|
|
+ .reducing(BigDecimal.ZERO,
|
|
|
|
|
+ TokenHistory::getPrice,
|
|
|
|
|
+ BigDecimal::add)));
|
|
|
|
|
|
|
|
DateTimeFormatter dft = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
DateTimeFormatter dft = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
userMap.forEach((key, value) -> {
|
|
userMap.forEach((key, value) -> {
|
|
@@ -736,7 +750,7 @@ public class CollectionService {
|
|
|
User user = value.get(collection.getAssignment() - 1);
|
|
User user = value.get(collection.getAssignment() - 1);
|
|
|
//作弊得已屏蔽
|
|
//作弊得已屏蔽
|
|
|
if ((ObjectUtils.isEmpty(buy) || buy.compareTo(BigDecimal.valueOf(500)) < 0) && user.getCreatedAt()
|
|
if ((ObjectUtils.isEmpty(buy) || buy.compareTo(BigDecimal.valueOf(500)) < 0) && user.getCreatedAt()
|
|
|
- .isBefore(time)) {
|
|
|
|
|
|
|
+ .isBefore(time)) {
|
|
|
sum1.getAndIncrement();
|
|
sum1.getAndIncrement();
|
|
|
System.out.println(key + "," + dft.format(user.getCreatedAt()) + "," + buy);
|
|
System.out.println(key + "," + dft.format(user.getCreatedAt()) + "," + buy);
|
|
|
} else {
|
|
} else {
|
|
@@ -753,21 +767,21 @@ public class CollectionService {
|
|
|
LongArrayConverter longArrayConverter = new LongArrayConverter();
|
|
LongArrayConverter longArrayConverter = new LongArrayConverter();
|
|
|
|
|
|
|
|
List<Long> collect = dtos.stream()
|
|
List<Long> collect = dtos.stream()
|
|
|
- .filter(dto -> time.isBefore(dto.getCreatedAt()))
|
|
|
|
|
- .map(PointDTO::getId)
|
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
|
|
|
+ .filter(dto -> time.isBefore(dto.getCreatedAt()))
|
|
|
|
|
+ .map(PointDTO::getId)
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
log.info(dft.format(time) + "前完成任务人数:{}", collect.size());
|
|
log.info(dft.format(time) + "前完成任务人数:{}", collect.size());
|
|
|
// log.info("sql: update user set vip_point = 1 where id in ({})", longArrayConverter.convertToDatabaseColumn(collect));
|
|
// log.info("sql: update user set vip_point = 1 where id in ({})", longArrayConverter.convertToDatabaseColumn(collect));
|
|
|
|
|
|
|
|
List<PointDTO> collect1 = dtos.stream()
|
|
List<PointDTO> collect1 = dtos.stream()
|
|
|
- .filter(dto -> time.isAfter(dto.getCreatedAt()))
|
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
|
|
|
+ .filter(dto -> time.isAfter(dto.getCreatedAt()))
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
log.info(dft.format(time) + "后完成任务人数:{}", collect1.size());
|
|
log.info(dft.format(time) + "后完成任务人数:{}", collect1.size());
|
|
|
|
|
|
|
|
List<Long> collect2 = dtos.stream()
|
|
List<Long> collect2 = dtos.stream()
|
|
|
- .filter(dto -> dto.getIdentitySum() > 0)
|
|
|
|
|
- .map(PointDTO::getId)
|
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
|
|
|
+ .filter(dto -> dto.getIdentitySum() > 0)
|
|
|
|
|
+ .map(PointDTO::getId)
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
log.info("邀请实名认证人量:{}", collect2.size());
|
|
log.info("邀请实名认证人量:{}", collect2.size());
|
|
|
// log.info("sql: update user set vip_point = 1 where id in ({})", longArrayConverter.convertToDatabaseColumn(collect2));
|
|
// log.info("sql: update user set vip_point = 1 where id in ({})", longArrayConverter.convertToDatabaseColumn(collect2));
|
|
|
|
|
|