1
This commit is contained in:
@@ -114,9 +114,8 @@ public class AmazonScrapingServiceImpl implements IAmazonScrapingService, PagePr
|
||||
if (asin == null || asin.trim().isEmpty()) continue;
|
||||
String cleanAsin = asin.replaceAll("[^a-zA-Z0-9]", "");
|
||||
|
||||
// 查找缓存,有缓存就用缓存,没缓存就爬取
|
||||
Optional<AmazonProductEntity> cached = amazonProductRepository.findByAsin(cleanAsin);
|
||||
if (cached.isPresent()) {
|
||||
if (cached.isPresent() && !isEmpty(cached.get().getPrice()) && !isEmpty(cached.get().getSeller())) {
|
||||
AmazonProductEntity entity = cached.get();
|
||||
entity.setSessionId(sessionId);
|
||||
entity.setUpdatedAt(LocalDateTime.now());
|
||||
|
||||
Reference in New Issue
Block a user