修改返回数组类型
This commit is contained in:
parent
005b775a7c
commit
cce3d084a4
@ -88,13 +88,12 @@ public class CountServiceImpl extends DefaultBaseService implements ICountServic
|
||||
public Map<String, Object> countLoginForDays(Integer days) {
|
||||
DateTime now = DateTime.now();
|
||||
DateTimeFormatter dayDateTimeFormatter = DateTimeFormat.forPattern(DAY_FORMATTER);
|
||||
String[] dateArray = new String[days];
|
||||
Integer[] loginCountArray = new Integer[days];
|
||||
List<String> dateArray = new ArrayList<>();
|
||||
List<String> loginCountArray = new ArrayList<>();
|
||||
for (int i = days - 1; i >= 0; i--) {
|
||||
String currentDay = now.minusDays(i).toString(dayDateTimeFormatter);
|
||||
int index = days - (i + 1);
|
||||
dateArray[index] = currentDay;
|
||||
loginCountArray[index] = loginLogService.countDay(currentDay);
|
||||
dateArray.add(currentDay);
|
||||
loginCountArray.add("" + loginLogService.countDay(currentDay));
|
||||
}
|
||||
Map<String, Object> result = new HashMap<>(2);
|
||||
result.put("dateArray", dateArray);
|
||||
|
Loading…
Reference in New Issue
Block a user