This commit is contained in:
2025-10-03 11:53:31 +08:00
parent b9de9ed7f4
commit bd9b0f9384

View File

@@ -119,7 +119,7 @@ public class JDInnerController {
}
// 获取本地可用的京东评论并统计
List<Comment> availableComments = commentRepository.findByProductIdAndIsUseNotAndPictureUrlsIsNotNull(productId, 1);
List<Comment> availableComments = commentRepository.findByProductIdAndPictureUrlsIsNotNull(productId);
List<Comment> usedComments = commentRepository.findByProductIdAndIsUseNotAndPictureUrlsIsNotNull(productId, 0);
canUseCommentCount = availableComments.size();
@@ -129,7 +129,7 @@ public class JDInnerController {
// 获取淘宝评论统计信息
HashMap<String, String> tbMap = jdUtil.getProductTypeMapForTB();
String taobaoProductId = tbMap.getOrDefault(productId, productId);
List<TaobaoComment> availableTbComments = taobaoCommentRepository.findByProductIdAndIsUseNotAndPictureUrlsIsNotNull(taobaoProductId, 1);
List<TaobaoComment> availableTbComments = taobaoCommentRepository.findByProductIdAndPictureUrlsIsNotNull(taobaoProductId);
List<TaobaoComment> usedTbComments = taobaoCommentRepository.findByProductIdAndIsUseNotAndPictureUrlsIsNotNull(taobaoProductId, 0);
canUseTbCommentCount = availableTbComments.size();
usedTbCommentCount = usedTbComments.size();
@@ -163,7 +163,7 @@ public class JDInnerController {
*/
if (commentToUse == null && !usedComments.isEmpty()) {
Collections.shuffle(usedComments);
commentToUse = usedComments.get(0);
commentToUse = availableComments.get(0);
}
}