|
@@ -1,5 +1,6 @@
|
|
|
package com.zswl.cloud.springBtach.server.core.publish;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.github.microservice.productcenter.client.model.LocationModel;
|
|
|
import com.github.microservice.productcenter.client.model.ProductPushModel;
|
|
|
import com.github.microservice.productcenter.client.model.ProductTriggerTaskModel;
|
|
@@ -20,7 +21,6 @@ import java.util.Collection;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
@Slf4j
|
|
|
@Component
|
|
@@ -67,16 +67,15 @@ public class TicketPublish implements ProductPublish {
|
|
|
|
|
|
List<ScenicListResponse.rows> rows = scenicListResponse.getData().getRows();
|
|
|
|
|
|
- if (rows.isEmpty()) {
|
|
|
+ if (ObjectUtil.isEmpty(rows)) {
|
|
|
return;
|
|
|
}
|
|
|
rows.forEach(it -> {
|
|
|
|
|
|
try {
|
|
|
- System.out.println(it);
|
|
|
LocationModel locationModel = new LocationModel();
|
|
|
String glocation = it.getGlocation();
|
|
|
- if (!glocation.isEmpty()) {
|
|
|
+ if (ObjectUtil.isNotEmpty(glocation)) {
|
|
|
String[] split = glocation.split(",");
|
|
|
|
|
|
locationModel.setLatitude(Double.parseDouble(split[0]));
|