...
|
...
|
@@ -470,10 +470,11 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
|
|
jo.put("today", ymd);
|
|
|
JSONArray yearArray = new JSONArray();
|
|
|
int year = Integer.parseInt(ymd.substring(0, 4));
|
|
|
for (int y = year - 3; y <= year + 1; y++) {
|
|
|
int month = Integer.parseInt(ymd.substring(5, 7));
|
|
|
for (int y = year - 1; y <= year + 1; y++) {
|
|
|
JSONObject yearData = new JSONObject();
|
|
|
JSONArray monthArray = new JSONArray();
|
|
|
for (int m = 1; m <= 12; m++) {
|
|
|
for (int m = ((y == year - 1)? month:1); m <= ((y == year + 1)?month:12); m++) {
|
|
|
String ym = y + "-" + (m < 10 ? "0" + m : Integer.toString(m));
|
|
|
Integer count = countMap.getInteger(ym);
|
|
|
JSONObject ymData = new JSONObject();
|
...
|
...
|
@@ -605,5 +606,5 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
|
|
processProductSales(data.getJSONArray("product_list"));
|
|
|
}
|
|
|
return data;
|
|
|
}
|
|
|
}
|
|
|
} |
...
|
...
|
|