소스 검색

fix:手机端增加提现记录列表1

wrj 10 달 전
부모
커밋
17bcdee09c

+ 2 - 2
nightFragrance-massage/src/main/java/com/ylx/massage/service/impl/TOrderServiceImpl.java

@@ -150,8 +150,8 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
         }
         TJs js = jsService.getById(order.getcJsId());
         //添加位置信息
-        locationUtil.geoAdd(LocationUtil.GEO_KEY_USER, js.getcOpenId(), Double.parseDouble(js.getLongitude().toString()), Double.parseDouble(js.getLatitude().toString()));
-        locationUtil.geoAdd(LocationUtil.GEO_KEY_USER, order.getcOpenId(), Double.parseDouble(address.getLongitude().toString()), Double.parseDouble(address.getLatitude().toString()));
+        locationUtil.geoAdd(LocationUtil.GEO_KEY_USER, "js" + js.getcOpenId(), Double.parseDouble(js.getLongitude().toString()), Double.parseDouble(js.getLatitude().toString()));
+        locationUtil.geoAdd(LocationUtil.GEO_KEY_USER, "user" + order.getcOpenId(), Double.parseDouble(address.getLongitude().toString()), Double.parseDouble(address.getLatitude().toString()));
         double distance = locationUtil.getDistance(js.getcOpenId(), order.getcOpenId());
         locationUtil.remove(LocationUtil.GEO_KEY_USER, js.getcOpenId() + "," + order.getcOpenId());
         order.setDistance(new BigDecimal(distance));

+ 3 - 1
nightFragrance-massage/src/main/java/com/ylx/massage/utils/LocationUtil.java

@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
 import com.ylx.common.constant.MassageConstants;
 import com.ylx.massage.domain.Location;
 import com.ylx.massage.domain.TJs;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.compress.utils.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.geo.*;
@@ -22,6 +23,7 @@ import java.util.*;
  * @date 2024-04-07 15:49
  */
 @Component
+@Slf4j
 public class LocationUtil {
 
     @Autowired
@@ -135,7 +137,7 @@ public class LocationUtil {
     public double getDistance(String jsKey,String userKey) {
         // 获取两个城市之间的距离
         Distance distance = redisTemplate.opsForGeo().distance(GEO_KEY, jsKey, userKey, RedisGeoCommands.DistanceUnit.KILOMETERS);
-        System.out.println("获取两之间的距离:"+distance.getValue()+" 千米");
+        log.info("获取"+jsKey + "--"+userKey +"两之间的距离:"+distance.getValue()+"千米");
         return distance.getValue();
     }