|
@@ -580,7 +580,7 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (totalIssuedCount > 0) {
|
|
if (totalIssuedCount > 0) {
|
|
|
- log.info("CommonRatingService 好评送券汇总:总发放数量={}, 活动数={}, userId={}, storeId={}",
|
|
|
|
|
|
|
+ log.info("CommonRatingService 好评=送券汇总:总发放数量={}, 活动数={}, userId{}, storeId={}",
|
|
|
totalIssuedCount, activities.size(), commonRating.getUserId(), businessId);
|
|
totalIssuedCount, activities.size(), commonRating.getUserId(), businessId);
|
|
|
}
|
|
}
|
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
@@ -1132,6 +1132,10 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
|
|
|
.eq(CommonRating::getIsShow, 1)
|
|
.eq(CommonRating::getIsShow, 1)
|
|
|
.eq(CommonRating::getAuditStatus, 1);
|
|
.eq(CommonRating::getAuditStatus, 1);
|
|
|
List<CommonRating> ratings = commonRatingMapper.selectList(wrapper);
|
|
List<CommonRating> ratings = commonRatingMapper.selectList(wrapper);
|
|
|
|
|
+
|
|
|
|
|
+ StoreInfo storeInfoNew=storeInfoMapper.getStoreInfo(businessId);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
int total = ratings.size();
|
|
int total = ratings.size();
|
|
|
|
|
|
|
@@ -1154,6 +1158,10 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (commentCount < 10) {
|
|
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);
|
|
@@ -1165,7 +1173,8 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
|
|
|
log.info("店铺有效评价被删除<10条,重置评分为3.5,businessId={}", businessId);
|
|
log.info("店铺有效评价被删除<10条,重置评分为3.5,businessId={}", businessId);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 计算平均评分
|
|
// 计算平均评分
|
|
|
double scoreSum = ratings.stream().mapToDouble(r -> r.getScore() != null ? r.getScore() : 0.0).sum();
|
|
double scoreSum = ratings.stream().mapToDouble(r -> r.getScore() != null ? r.getScore() : 0.0).sum();
|
|
|
double scoreOneSum = ratings.stream().mapToDouble(r -> r.getScoreOne() != null ? r.getScoreOne() : 0.0).sum();
|
|
double scoreOneSum = ratings.stream().mapToDouble(r -> r.getScoreOne() != null ? r.getScoreOne() : 0.0).sum();
|