Commit bff74782 by weijiguang

添加错误日志

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