Commit 4e382f1b by 吕明尚

Merge branch 'dev' into test

parents 6aa80f98 eda4d4f8
......@@ -76,7 +76,7 @@ public class SStoreVo extends BaseEntity
private String storeType;
@ApiModelProperty(value = "距离(KM)")
private String distance;
private Double distance;
@ApiModelProperty(value = "房间列表")
private List<SRoomVo> roomVoList;
......
......@@ -323,7 +323,7 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
double distance = geo.calcDistance(nowPoint, geo.makePoint(Double.parseDouble(o.getLongitude()), Double.parseDouble(o.getLatitude()))) * DistanceUtils.DEG_TO_KM;
SStoreVo vo = new SStoreVo();
BeanUtils.copyProperties(o, vo);
vo.setDistance(distance + "");
vo.setDistance(distance);
// 计算当天预定最后预定时间
SOrder order = orderMap.get(vo.getId());
if (order != null) {
......@@ -350,7 +350,6 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
});
//排序条件 getStatus()从小到大并且getDistance()从小到大
voList.sort(Comparator.comparing(SStoreVo::getStatus).thenComparing(SStoreVo::getDistance));
// voList.stream().sorted(Comparator.comparing(storeVo -> Double.parseDouble(storeVo.getDistance()))).collect(Collectors.toList());
}
return voList;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment