springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ShopFlowerApi.java
@@ -219,7 +219,7 @@ return R.fail("请重新登陆"); } orderPayDTO.setOpenId(loginUserInfo.getOpenid()); return communityService.wxPay(orderPayDTO); return communityService.wxPayFlower(orderPayDTO); } /** springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/WxCallbackApi.java
@@ -387,7 +387,7 @@ notifyOrderDTO.setCashFee(cashFee); // 根据订单号修改订单信息 communityService.wxOrderPayNotify(notifyOrderDTO); communityService.wxOrderPayNotifyFlower(notifyOrderDTO); // 封装 返回值 StringBuffer buffer = new StringBuffer(); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientElevatingPointServiceImpl.java
@@ -131,7 +131,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(); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/MapDistance.java
@@ -1,5 +1,7 @@ package com.panzhihua.service_community.util; import lombok.extern.slf4j.Slf4j; import java.util.HashMap; import java.util.Map; @@ -9,6 +11,7 @@ * @Date: 2022/11/11 15:21 * @Description: 经纬度处理 */ @Slf4j public class MapDistance { private static double EARTH_RADIUS = 6378.137; @@ -73,14 +76,15 @@ * 最大经度 maxLng * 最大纬度 minLat */ public static Map<Object,Object> getAround(String latStr, String lngStr, String raidus) { public static Map<Object,Object> getAround(String latStr, String lngStr, double raidusMile) { log.info("latStr:"+latStr+",lngStr:"+lngStr+",raidusMile:"+raidusMile); Map<Object,Object> map = new HashMap<Object,Object>(); Double latitude = Double.parseDouble(latStr);// 传值给经度 Double longitude = Double.parseDouble(lngStr);// 传值给纬度 Double degree = (24901 * 1609) / 360.0; // 获取每度 double raidusMile = Double.parseDouble(raidus); // double raidusMile = Double.parseDouble(raidus); Double mpdLng = Double.parseDouble((degree * Math.cos(latitude * (Math.PI / 180))+"").replace("-", "")); Double dpmLng = 1 / mpdLng; @@ -113,10 +117,10 @@ System.out.println(getDistance("30.57568","103.962128","30.636726","103.957232")); //103.842654,30.560987 System.out.println(getAround("103.842654", "30.560987", "5000")); System.out.println(getAround("107.075277", "30.456085", 5000d)); //117.01028712333508(Double), 117.22593287666493(Double), //36.44829619896034(Double), 36.92138380103966(Double) //104.03035080138962(String), 104.12020319861038(String), 30.271352899925574(String), 30.64081710007443(String) distanceOfTwoPoints("30.57568","103.962128","30.636726","103.957232"); }