Browse Source

feat(course): 添加课程详情中的站点经纬度信息

- 在课程详情中设置站点的纬度和经度信息
- 使用PositionUtil工具类计算距离并设置地址
- 优化课程详情数据结构,增强位置信息展示
SheepHy 2 weeks ago
parent
commit
660b4a28c3

+ 1 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/DetailServiceImpl.java

@@ -220,6 +220,7 @@ public class DetailServiceImpl implements IDetailService {
         if (appSite!=null&& ObjectUtils.isNotEmpty(appSite.getLatitude())&& ObjectUtils.isNotEmpty(appSite.getLongitude())){
             courseInfoVO.setKm(PositionUtil.calculateDistance(latitude, longitude, appSite.getLatitude().doubleValue(), appSite.getLongitude().doubleValue()));
             courseInfoVO.setAddress(appSite.getName());
+            courseInfoVO.setLatitude(appSite.getLatitude()).setLongitude(appSite.getLongitude());
         }
         courseInfoVO.setSales(getCourseSales(id));
         List<CourseInfoVO.CourseDetailVO> courseDetailVOList = new ArrayList<>();