Commit bff74782 by weijiguang

添加错误日志

parent 4c5ff106
...@@ -47,6 +47,7 @@ import org.springframework.core.io.ClassPathResource; ...@@ -47,6 +47,7 @@ import org.springframework.core.io.ClassPathResource;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.FileCopyUtils; import org.springframework.util.FileCopyUtils;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
...@@ -644,6 +645,9 @@ public class WeixinServiceImpl { ...@@ -644,6 +645,9 @@ public class WeixinServiceImpl {
} }
List<Shop> shops = shopMapper.selectShopList(shop); List<Shop> shops = shopMapper.selectShopList(shop);
List<JSONObject> proviceList = new ArrayList<>(); List<JSONObject> proviceList = new ArrayList<>();
if (CollectionUtils.isEmpty(shops)) {
return proviceList;
}
List<String> proString = new ArrayList<>(); List<String> proString = new ArrayList<>();
for (Shop shop1 : shops) { for (Shop shop1 : shops) {
if (StringUtils.isNotEmpty(lng) && StringUtils.isNotEmpty(lat)) { if (StringUtils.isNotEmpty(lng) && StringUtils.isNotEmpty(lat)) {
...@@ -655,7 +659,7 @@ public class WeixinServiceImpl { ...@@ -655,7 +659,7 @@ public class WeixinServiceImpl {
shop1.setDistance("-1"); shop1.setDistance("-1");
shop1.setOrderState(1); shop1.setOrderState(1);
} }
if (BooleanUtils.isTrue(testFlag) && ShopState.TESTING.getState().equals(shop.getState())) { if (BooleanUtils.isTrue(testFlag) && ShopState.TESTING.getState().equals(shop1.getState())) {
shop1.setState(ShopState.OPEN.getState()); shop1.setState(ShopState.OPEN.getState());
shop1.setOrderState(1); shop1.setOrderState(1);
shop1.setStateDesc(""); shop1.setStateDesc("");
...@@ -693,7 +697,6 @@ public class WeixinServiceImpl { ...@@ -693,7 +697,6 @@ public class WeixinServiceImpl {
zone.put("shops", shopList); zone.put("shops", shopList);
} }
} }
} }
if (cityboo) { if (cityboo) {
JSONObject city = new JSONObject(); JSONObject city = new JSONObject();
...@@ -710,11 +713,8 @@ public class WeixinServiceImpl { ...@@ -710,11 +713,8 @@ public class WeixinServiceImpl {
zones.add(zone); zones.add(zone);
city.put("children", zones); city.put("children", zones);
} }
} }
} }
} else { } else {
proString.add(province); proString.add(province);
JSONObject provice = new JSONObject(); JSONObject provice = new JSONObject();
...@@ -737,7 +737,6 @@ public class WeixinServiceImpl { ...@@ -737,7 +737,6 @@ public class WeixinServiceImpl {
List<JSONObject> zones = new ArrayList<>(); List<JSONObject> zones = new ArrayList<>();
zones.add(zone); zones.add(zone);
city.put("children", zones); city.put("children", zones);
} }
} }
return proviceList; return proviceList;
......
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