yanghui
2022-11-26 0c9874c42bfa88f9b86112a3dbf9cf77f4393880
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientElevatingPointServiceImpl.java
@@ -123,7 +123,9 @@
    @Override
    public R detailPoint(Long pointId) {
        ConvenientElevatingPointDO convenientElevatingPointDO = this.baseMapper.selectById(pointId);
        return R.ok(convenientElevatingPointDO);
        ConvenientElevatingPointVO convenientElevatingPointVO = new ConvenientElevatingPointVO();
        BeanUtils.copyProperties(convenientElevatingPointDO,convenientElevatingPointVO);
        return R.ok(convenientElevatingPointVO);
    }
    public R findPointByMerchantId(Long merchantId, String lat, String lng) {
@@ -131,7 +133,7 @@
        //服务最远距离 km
        Integer serviceRange = convenientMerchantDO.getServiceRange();
        Map<Object, Object> around = MapDistance.getAround(convenientMerchantDO.getLat(), convenientMerchantDO.getLon(), serviceRange * 1000 + "");
        Map<Object, Object> around = MapDistance.getAround(convenientMerchantDO.getLat(), convenientMerchantDO.getLon(), serviceRange * 1000d);
        String maxLat = around.get("maxLat").toString();
        String minLat = around.get("minLat").toString();
        String minLng = around.get("minLng").toString();
@@ -146,7 +148,7 @@
        convenientElevatingPointDOS.forEach(f -> {
            ConvenientElevatingPointVO convenientElevatingPointVO = new ConvenientElevatingPointVO();
            BeanUtils.copyProperties(f, convenientElevatingPointVO);
            Double distance = MapDistance.distanceOfTwoPoints(lng, lat, f.getLon(), f.getLat());
            Double distance = MapDistance.distanceOfTwoPoints(lat, lng, f.getLon(), f.getLat());
            convenientElevatingPointVO.setDistance(distance);
            convenientElevatingPointVOS.add(convenientElevatingPointVO);
        });