Commit 5d94ff84 by weijiguang

下单时校验订单中sku数量

parent ebea8be4
...@@ -151,6 +151,7 @@ public class AppServiceImpl { ...@@ -151,6 +151,7 @@ public class AppServiceImpl {
for (Shop s : shops) { // 获取所有店铺距离 for (Shop s : shops) { // 获取所有店铺距离
double realDistance = DistanceUtil.getRealDistance(Double.parseDouble(locationPo.getLng()), Double.parseDouble(locationPo.getLat()), Double.parseDouble(s.getLng()), Double.parseDouble(s.getLat())); double realDistance = DistanceUtil.getRealDistance(Double.parseDouble(locationPo.getLng()), Double.parseDouble(locationPo.getLat()), Double.parseDouble(s.getLng()), Double.parseDouble(s.getLat()));
s.setRealDistance(realDistance); s.setRealDistance(realDistance);
s.setDistance(DistanceUtil.getDistanceDesc(realDistance));
perfectOrderState(s, locationPo.getLng(), locationPo.getLat()); perfectOrderState(s, locationPo.getLng(), locationPo.getLat());
} }
shops.sort(Comparator.comparing(Shop::getRealDistance)); // 按距离排序 shops.sort(Comparator.comparing(Shop::getRealDistance)); // 按距离排序
......
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