@GetMapping("/queryDailyAndMonthlyActiveUserCoinLog")
public AjaxResult queryDailyAndMonthlyActiveUserCoinLog() {
LocalDateTime startOfDay = LocalDate.now().atStartOfDay();
LocalDateTime endOfDay = LocalDate.now().atTime(23, 59, 59, 999999999);
LambdaQueryWrapper<UserCoinLog> lqw = new LambdaQueryWrapper<>();
lqw.eq(UserCoinLog::getAction,"LOGINLOG");
lqw.le(UserCoinLog::getCreateTime, endOfDay);
lqw.ge(UserCoinLog::getCreateTime, startOfDay);
List<UserCoinLog> listDay = userCoinLogsService.list(lqw);
int daySize = listDay.size();
LocalDate today = LocalDate.now();
LocalDate startOfMonth = today.withDayOfMonth(1);
LocalDate lastDayOfMonth = today.withDayOfMonth(today.lengthOfMonth());
LocalDateTime startOfMonthDateTime = startOfMonth.atStartOfDay();
LocalDateTime endOfMonthDateTime = lastDayOfMonth.atTime(23, 59, 59, 999999999);
LambdaQueryWrapper<UserCoinLog> monthlyWrapper = new LambdaQueryWrapper<>();
monthlyWrapper.eq(UserCoinLog::getAction, "LOGINLOG");
monthlyWrapper.ge(UserCoinLog::getCreateTime, startOfMonthDateTime);
monthlyWrapper.le(UserCoinLog::getCreateTime, endOfMonthDateTime);
List<UserCoinLog> listMonth = userCoinLogsService.list(monthlyWrapper);
int monthSize = listMonth.size();
HashMap<String, Integer> totalCount = new HashMap<>();
totalCount.put("totalDau", daySize);
totalCount.put("totalMau", monthSize);
return AjaxResult.success(totalCount);
}