public List<StatData> getData(String startTime, String endTime, String inlongGroupId,
            String inlongStreamId, String auditId) {
        List<StatData> result = new LinkedList<>();
        String querySQL = Configuration.getInstance().get(KEY_MYSQL_SOURCE_QUERY_DAY_SQL,
                DEFAULT_MYSQL_SOURCE_QUERY_DAY_SQL);
        List<String> paramList = new ArrayList<>();
        if (WILDCARD_STREAM_ID.equals(inlongStreamId)) {
            querySQL = AuditUtils.removeStreamIdCondition(querySQL);
            querySQL = AuditUtils.removeStreamIdColumn(querySQL);
            paramList.add(startTime);
            paramList.add(endTime);
            paramList.add(inlongGroupId);
            paramList.add(auditId);
        } else {
            paramList.add(startTime);
            paramList.add(endTime);
            paramList.add(inlongGroupId);
            paramList.add(inlongStreamId);
            paramList.add(auditId);
        }
        try (Connection connection = dataSource.getConnection();
                PreparedStatement pstat = connection.prepareStatement(querySQL)) {
            if (connection.isClosed()) {
                createDataSource();
            }
            for (int i = 0; i < paramList.size(); i++) {
                pstat.setString(i + 1, paramList.get(i));
            }
            try (ResultSet resultSet = pstat.executeQuery()) {
                while (resultSet.next()) {
                    StatData data = new StatData();
                    data.setLogTs(resultSet.getString(COLUMN_LOG_TS));
                    data.setInlongGroupId(resultSet.getString(COLUMN_GROUP_ID));
                    data.setAuditId(resultSet.getString(COLUMN_AUDIT_ID));
                    data.setAuditTag(resultSet.getString(COLUMN_AUDIT_TAG));
                    data.setCount(resultSet.getLong(COLUMN_CNT));
                    data.setSize(resultSet.getLong(COLUMN_SIZE));
                    data.setDelay(resultSet.getLong(COLUMN_DELAY));

                    if (WILDCARD_STREAM_ID.equals(inlongStreamId)) {
                        data.setInlongStreamId(WILDCARD_STREAM_ID);
                    } else {
                        data.setInlongStreamId(resultSet.getString(COLUMN_STREAM_ID));
                    }

                    result.add(data);
                }
            } catch (SQLException sqlException) {
                LOGGER.error("Query has SQL exception! ", sqlException);
            }
        } catch (Exception exception) {
            LOGGER.error("Query has exception! ", exception);
        }

        return WILDCARD_STREAM_ID.equals(inlongStreamId)
                ? AuditUtils.aggregateStatData(result, inlongStreamId)
                : result;
    }
Get data

@param startTime
@param endTime
@param inlongGroupId
@param inlongStreamId
@param auditId
@return
inlong-audit/audit-service/src/main/java/org/apache/inlong/audit/service/cache/DayCache.java