1
This commit is contained in:
@@ -119,7 +119,9 @@ public class JDInnerController {
|
||||
}
|
||||
|
||||
// 获取本地可用的京东评论并统计
|
||||
List<Comment> availableComments = commentRepository.findByProductIdAndPictureUrlsIsNotNull(productId);
|
||||
// 查询未使用的评论:isUse != 1(即 isUse = 0 或 isUse is null)
|
||||
List<Comment> availableComments = commentRepository.findByProductIdAndIsUseNotAndPictureUrlsIsNotNull(productId, 1);
|
||||
// 查询已使用的评论:isUse != 0(即 isUse = 1)
|
||||
List<Comment> usedComments = commentRepository.findByProductIdAndIsUseNotAndPictureUrlsIsNotNull(productId, 0);
|
||||
|
||||
canUseCommentCount = availableComments.size();
|
||||
@@ -129,7 +131,9 @@ public class JDInnerController {
|
||||
// 获取淘宝评论统计信息
|
||||
HashMap<String, String> tbMap = jdUtil.getProductTypeMapForTB();
|
||||
String taobaoProductId = tbMap.getOrDefault(productId, productId);
|
||||
List<TaobaoComment> availableTbComments = taobaoCommentRepository.findByProductIdAndPictureUrlsIsNotNull(taobaoProductId);
|
||||
// 查询未使用的淘宝评论:isUse != 1
|
||||
List<TaobaoComment> availableTbComments = taobaoCommentRepository.findByProductIdAndIsUseNotAndPictureUrlsIsNotNull(taobaoProductId, 1);
|
||||
// 查询已使用的淘宝评论:isUse != 0
|
||||
List<TaobaoComment> usedTbComments = taobaoCommentRepository.findByProductIdAndIsUseNotAndPictureUrlsIsNotNull(taobaoProductId, 0);
|
||||
canUseTbCommentCount = availableTbComments.size();
|
||||
usedTbCommentCount = usedTbComments.size();
|
||||
|
||||
Reference in New Issue
Block a user