Skip to content

Commit

Permalink
wall of fame api changes (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
shankaragoudab authored Mar 13, 2024
1 parent 472c787 commit 79e7906
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,20 @@ public Map<String, Object> fetchHallOfFameData() {
int lastMonthYearValue = lastMonthDate.getYear();

String formattedDateLastMonth = currentDate.minusMonths(1).format(DateTimeFormatter.ofPattern("MMMM yyyy"));
Map<String, Object> propertymap = new HashMap<>();
propertymap.put(Constants.MONTH, lastMonthValue);
propertymap.put(Constants.YEAR, lastMonthYearValue);
Map<String, Object> propertyMap = new HashMap<>();
propertyMap.put(Constants.MONTH, lastMonthValue);
propertyMap.put(Constants.YEAR, lastMonthYearValue);

List<Map<String, Object>> dptList = cassandraOperation.getRecordsByPropertiesWithoutFiltering(
Constants.KEYSPACE_SUNBIRD, Constants.MDO_KARMA_POINTS, propertymap, null);
Constants.KEYSPACE_SUNBIRD, Constants.MDO_KARMA_POINTS, propertyMap, null);
if (dptList.isEmpty()) {
formattedDateLastMonth = currentDate.minusMonths(2).format(DateTimeFormatter.ofPattern("MMMM yyyy"));
propertyMap.clear();
propertyMap.put(Constants.MONTH, currentDate.minusMonths(2).getMonthValue());
propertyMap.put(Constants.YEAR, currentDate.minusMonths(2).getYear());
dptList = cassandraOperation.getRecordsByPropertiesWithoutFiltering(
Constants.KEYSPACE_SUNBIRD, Constants.MDO_KARMA_POINTS, propertyMap, null);
}
resultMap.put(Constants.MDO_LIST, dptList);
resultMap.put(Constants.TITLE, formattedDateLastMonth);
return resultMap;
Expand Down

0 comments on commit 79e7906

Please sign in to comment.