|
|
@@ -663,10 +663,10 @@ public class StoreCommentServiceImpl extends ServiceImpl<StoreCommentMapper, Sto
|
|
|
double serviceScore = (total == 0 ? 0 : storeInfoScoreVo.getServiceScore() / total);
|
|
|
StoreInfo storeInfo = new StoreInfo();
|
|
|
storeInfo.setId(storeId);
|
|
|
- storeInfo.setScoreAvg(scoreAvg);
|
|
|
- storeInfo.setTasteScore(tasteScore);
|
|
|
- storeInfo.setEnScore(enScore);
|
|
|
- storeInfo.setServiceScore(serviceScore);
|
|
|
+ storeInfo.setScoreAvg(new BigDecimal(scoreAvg).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
|
+ storeInfo.setTasteScore(new BigDecimal(tasteScore).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
|
+ storeInfo.setEnScore(new BigDecimal(enScore).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
|
+ storeInfo.setServiceScore(new BigDecimal(serviceScore).setScale(2, RoundingMode.HALF_UP).doubleValue());
|
|
|
storeInfoMapper.updateById(storeInfo);
|
|
|
StoreUser storeUser = storeUserMapper.selectOne(new LambdaQueryWrapper<StoreUser>().eq(StoreUser::getStoreId, storeInfo.getId()).eq(StoreUser::getDeleteFlag, 0));
|
|
|
|