|
@@ -293,7 +293,15 @@ public class DetailServiceImpl implements IDetailService {
|
|
|
double km = PositionUtil.calculateDistance(latitude, longitude, appSite.getLatitude().doubleValue(), appSite.getLongitude().doubleValue());
|
|
|
courseInfoVO.setKm(new BigDecimal(String.valueOf(km)));
|
|
|
}
|
|
|
+ String positiveRating = evaluateMapper.findPositiveRating(courseInfoVO.getId());
|
|
|
+ BigDecimal decimalValue = null;
|
|
|
+ try {
|
|
|
+ decimalValue = new BigDecimal(positiveRating);
|
|
|
+ } catch (Exception e) {
|
|
|
+ decimalValue=BigDecimal.ZERO;
|
|
|
+ }
|
|
|
|
|
|
+ courseInfoVO.setGoodRate(decimalValue);
|
|
|
courseInfoVOList.add(courseInfoVO);
|
|
|
});
|
|
|
return courseInfoVOList;
|
|
@@ -409,6 +417,7 @@ public class DetailServiceImpl implements IDetailService {
|
|
|
courseResponseVo.setCover(string);
|
|
|
courseResponseVo.setAnnualSalesNum(getCourseSalesCountYear(courseResponseVo.getId()));
|
|
|
courseResponseVo.setSaleNum(getCourseSalesCount(courseResponseVo.getId()));
|
|
|
+ courseResponseVo.setGoodRate(evaluateMapper.findPositiveRating(courseResponseVo.getId()));
|
|
|
});
|
|
|
return courseInfoVOIPage;
|
|
|
}
|