Commit 3d03c69e by weijiguang

优化店铺距离限制

parent 734a6f98
...@@ -109,11 +109,11 @@ public class AppServiceImpl { ...@@ -109,11 +109,11 @@ public class AppServiceImpl {
if (!StringUtils.isEmpty(lng) && !StringUtils.isEmpty(lat)) { if (!StringUtils.isEmpty(lng) && !StringUtils.isEmpty(lat)) {
double realDistance = DistanceUtil.getRealDistance(Double.parseDouble(lng), Double.parseDouble(lat), Double.parseDouble(shop.getLng()), Double.parseDouble(shop.getLat())); double realDistance = DistanceUtil.getRealDistance(Double.parseDouble(lng), Double.parseDouble(lat), Double.parseDouble(shop.getLng()), Double.parseDouble(shop.getLat()));
double realKm = realDistance / 1000; double realKm = realDistance / 1000;
if (realKm > 10) { // if (realKm > 10) {
shop.setOrderState(0); // shop.setOrderState(0);
shop.setStateDesc("距离较远,门店暂停接单"); // shop.setStateDesc("距离较远,门店暂停接单");
return false; // return false;
} // }
Double shopLimit = shop.getDistanceLimit(); Double shopLimit = shop.getDistanceLimit();
if (shopLimit != null && shopLimit > 0 && realKm > shopLimit) { if (shopLimit != null && shopLimit > 0 && realKm > shopLimit) {
shop.setOrderState(0); shop.setOrderState(0);
......
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