This commit is contained in:
root
2026-01-06 00:22:33 +05:00
parent 3f71c95823
commit 5ede45ca1b
2 changed files with 38 additions and 4 deletions
@@ -129,7 +129,7 @@ public class MarketingAnalysisResponseV2 {
private String title;
private MarketOverviewMetrics metrics;
private MonthlyOnlineIndex monthlyOnlineIndex;
private String geography;
private List<GeographyInterestByCity> geography;
private String conclusion;
public MarketOverview() {
@@ -159,11 +159,11 @@ public class MarketingAnalysisResponseV2 {
this.monthlyOnlineIndex = monthlyOnlineIndex;
}
public String getGeography() {
public List<GeographyInterestByCity> getGeography() {
return geography;
}
public void setGeography(String geography) {
public void setGeography(List<GeographyInterestByCity> geography) {
this.geography = geography;
}
@@ -176,6 +176,36 @@ public class MarketingAnalysisResponseV2 {
}
}
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class GeographyInterestByCity {
private String city;
private Integer interestIndex;
public GeographyInterestByCity() {
}
public GeographyInterestByCity(String city, Integer interestIndex) {
this.city = city;
this.interestIndex = interestIndex;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public Integer getInterestIndex() {
return interestIndex;
}
public void setInterestIndex(Integer interestIndex) {
this.interestIndex = interestIndex;
}
}
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class MarketOverviewMetrics {
private String onlineDemandIndex;
@@ -668,6 +668,7 @@ public class MarketingAnalysisService {
+ " - проценты/строки формата \"76/100\", \"+27%\", \"1.34x\" => string\n"
+ " - monthly_online_index.* => number (double)\n"
+ " - funnel_metrics.leads/bookings/payments => integer\n"
+ " - market_overview.geography => array of objects: [{\"city\": string, \"interest_index\": integer}]\n"
+ "5) Пиши на русском языке.\n"
+ "6) НИКОГДА не копируй значения из примера. В примере намеренно стоят плейсхолдеры, "
+ "которые начинаются с 'EXAMPLE__' и числа -9999/-9999.0 — в твоем ответе их быть НЕ должно.\n\n"
@@ -854,7 +855,10 @@ public class MarketingAnalysisService {
monthlyOnlineIndex.setApril(-9999.0);
monthlyOnlineIndex.setMay(-9999.0);
marketOverview.setMonthlyOnlineIndex(monthlyOnlineIndex);
marketOverview.setGeography("EXAMPLE__GEOGRAPHY");
marketOverview.setGeography(List.of(
new MarketingAnalysisResponseV2.GeographyInterestByCity("EXAMPLE__CITY_1", -9999),
new MarketingAnalysisResponseV2.GeographyInterestByCity("EXAMPLE__CITY_2", -9999),
new MarketingAnalysisResponseV2.GeographyInterestByCity("EXAMPLE__CITY_3", -9999)));
marketOverview.setConclusion("EXAMPLE__MARKET_OVERVIEW_CONCLUSION");
sections.setMarketOverview(marketOverview);