class CoreAppsStatCenterImpl implements CoreAppsStatCenter {

    @Autowired
    private AppService appService;
    @Autowired
    private AppDao appDao;
    @Autowired
    private UserService userService;
    @Autowired
    private ResourceDao resourceDao;
    @Autowired
    private EmailComponent emailComponent;
    @Autowired
    private Configuration configuration;
    @Autowired
    private MachineCenter machineCenter;

    @Override
    public boolean sendExpAppsStatDataEmail(String searchDate) {<FILL_FUNCTION_BODY>}

    public void noticeExpAppsDaily(String searchDate, Map<String, AppDesc> appDescMap, Map<String, List<Map<String, Object>>> appClientGatherStatGroup,Map<String,Object> exceptionMachineEnv) {
        String title = String.format("【CacheCloud】%s应用日报", searchDate);
        Map<String, Object> context = new HashMap<>();
        context.put("appDescMap", appDescMap);
        context.put("appClientGatherStatGroup", appClientGatherStatGroup);
        context.put("exceptionMachineEnv", exceptionMachineEnv);
        context.put("searchDate", searchDate);
        String mailContent = FreemakerUtils.createText("expAppsDaily.ftl", configuration, context);
        log.info("noticeExpAppsDaily sendMailToAdmin, title:{}, mailContent:{}", title, mailContent);
        // 发送管理员
        emailComponent.sendDailyMail(title, mailContent, Arrays.asList(AlertUtils.EMAILS.split(",")), null);
        log.info("noticeExpAppsDaily success");
    }


}

        try {
            log.info("sendExpAppsStatDataEmail");
            if (StringUtil.isBlank(searchDate)) {
                //默认发送前一天的日报
                Date startDate = DateUtils.addDays(new Date(), -1);
                searchDate = DateUtil.formatDate(startDate, "yyyy-MM-dd");
            }
            List<AppDesc> appDescList = appDao.getOnlineAppsNonTest();
            appDescList.forEach(appDesc -> {
                String versionName = Optional.ofNullable(resourceDao.getResourceById(appDesc.getVersionId())).map(ver -> ver.getName()).orElse("");
                appDesc.setVersionName(versionName);
                appDesc.setOfficer(userService.getOfficerName(appDesc.getOfficer()));
            });
            Map<String, AppDesc> appDescMap = appDescList.stream().collect(Collectors.toMap(appDesc -> String.valueOf(appDesc.getAppId()), Function.identity()));


            Map<String, List<Map<String, Object>>> appClientGatherStatGroup = appService.getFilterAppClientStatGather(-1, searchDate);

            // 获取异常的宿主或容器信息
            Map<String, Object> exceptionMachineEnv = machineCenter.getExceptionMachineEnv(DateUtils.addDays(new Date(), -1));

            noticeExpAppsDaily(searchDate, appDescMap, appClientGatherStatGroup,exceptionMachineEnv);
            return true;
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            return false;
        }
    
<no_super_class>