From a4fc8d1a88374ee4e1aba8acde5567e0abe9f659 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期五, 30 八月 2024 09:50:40 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile --- ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java index b2ae5fe..e073766 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java @@ -138,6 +138,11 @@ @PostMapping("/getDetailById") public AjaxResult<SiteDetailVO> getDetailById(@Validated @RequestBody SiteDetailQuery query){ SiteDetailVO siteDetailVO = siteService.getDetailById(query.getSiteId()); + // 查询合作商名称 + Partner partner = partnerService.getById(siteDetailVO.getPartnerId()); + if(Objects.nonNull(partner)){ + siteDetailVO.setPartnerName(partner.getName()); + } // 计算距离 Map<String, Double> distance = GeodesyUtil.getDistance(query.getLat() + "," + query.getLon(), siteDetailVO.getLat() + "," + siteDetailVO.getLon()); siteDetailVO.setDistance(distance.get("WGS84")); -- Gitblit v1.7.1