|
@@ -449,7 +449,6 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
|
|
|
storeInfo.setScoreOne(new BigDecimal(scoreOne).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
storeInfo.setScoreOne(new BigDecimal(scoreOne).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
|
storeInfo.setScoreTwo(new BigDecimal(scoreTwo).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
storeInfo.setScoreTwo(new BigDecimal(scoreTwo).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
|
storeInfo.setScoreThree(new BigDecimal(scoreThree).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
storeInfo.setScoreThree(new BigDecimal(scoreThree).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
|
- storeInfo.setBreakTen(1);
|
|
|
|
|
storeInfoMapper.updateById(storeInfo);
|
|
storeInfoMapper.updateById(storeInfo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1158,7 +1157,11 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (commentCount < 10 && storeInfoNew.getBreakTen()==1) {
|
|
|
|
|
|
|
+ if (commentCount < 10) {
|
|
|
|
|
+
|
|
|
|
|
+ if (storeInfoNew.getScoreAvg()==0.0){
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
// 没有评价,设置默认评分为0
|
|
// 没有评价,设置默认评分为0
|
|
|
StoreInfo storeInfo = new StoreInfo();
|
|
StoreInfo storeInfo = new StoreInfo();
|
|
|
storeInfo.setId(businessId);
|
|
storeInfo.setId(businessId);
|
|
@@ -1170,11 +1173,6 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
|
|
|
log.info("店铺有效评价被删除<10条,重置评分为3.5,businessId={}", businessId);
|
|
log.info("店铺有效评价被删除<10条,重置评分为3.5,businessId={}", businessId);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- //如果没到10条有效评价,则不更新评分,还继续为0
|
|
|
|
|
- if (commentCount < 10) {
|
|
|
|
|
- return ;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 计算平均评分
|
|
// 计算平均评分
|