|
@@ -66,18 +66,20 @@ public class CinemaPublish implements ProductPublish {
|
|
|
JSONArray data = (JSONArray) entries.getByPath("data");
|
|
|
data.forEach(it -> {
|
|
|
JSONObject entry = JSONUtil.parseObj(it);
|
|
|
+ System.out.println(entry);
|
|
|
String cinemaCode = entry.get("cinemaCode").toString();
|
|
|
String names = entry.get("name").toString();
|
|
|
BigDecimal lng = (BigDecimal) entry.get("lng");
|
|
|
BigDecimal lat = (BigDecimal) entry.get("lat");
|
|
|
- ProductPushModel.builder()
|
|
|
- .regionCode(productTriggerTask.getRegion().getCode())
|
|
|
- .pid(cinemaCode)
|
|
|
- .productType(ProductType.Cinema)
|
|
|
- .title(names)
|
|
|
- .locationPoint(LocationModel.builder().longitude(lng.doubleValue()).latitude(lat.doubleValue()).build())
|
|
|
- .meta(Map.of("cinemas", entries))
|
|
|
- .build();
|
|
|
+ updateService.push(
|
|
|
+ ProductPushModel.builder()
|
|
|
+ .regionCode(productTriggerTask.getRegion().getCode())
|
|
|
+ .pid(cinemaCode)
|
|
|
+ .productType(ProductType.Cinema)
|
|
|
+ .title(names)
|
|
|
+ .locationPoint(LocationModel.builder().longitude(lng.doubleValue()).latitude(lat.doubleValue()).build())
|
|
|
+ .meta(Map.of("cinemas", entries))
|
|
|
+ .build());
|
|
|
});
|
|
|
|
|
|
|