|
|
@@ -128,6 +128,8 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
|
|
|
private final StoreCommentMapper storeCommentMapper;
|
|
|
|
|
|
+ private final CommonRatingMapper commonRatingMapper;
|
|
|
+
|
|
|
private final StoreInfoDraftMapper storeInfoDraftMapper;
|
|
|
|
|
|
private final LifeNoticeMapper lifeNoticeMapper;
|
|
|
@@ -330,6 +332,15 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
} else {
|
|
|
storeMainInfoVo.setDistance2(0);
|
|
|
}
|
|
|
+
|
|
|
+ // 统计评价数量(common_rating 表,业务类型1=商铺评价)
|
|
|
+ LambdaQueryWrapper<CommonRating> ratingWrapper = new LambdaQueryWrapper<>();
|
|
|
+ ratingWrapper.eq(CommonRating::getBusinessType, 1); // 业务类型:1-商铺评价
|
|
|
+ ratingWrapper.eq(CommonRating::getBusinessId, id); // 门店ID
|
|
|
+ ratingWrapper.eq(CommonRating::getDeleteFlag, 0); // 未删除
|
|
|
+ Integer ratingCountLong = commonRatingMapper.selectCount(ratingWrapper);
|
|
|
+ storeMainInfoVo.setRatingCount(ratingCountLong != null ? ratingCountLong.intValue() : 0);
|
|
|
+
|
|
|
return storeMainInfoVo;
|
|
|
}
|
|
|
|