package com.common.service;


import com.common.entity.AppLog;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

//@Repository
public interface AppLogRepository extends ElasticsearchRepository<AppLog, String> {

    /**
     * 根据应用名称和日志级别查询
     */
    List<AppLog> findByAppNameAndLogLevel(String appName, String logLevel);

    /**
     * 根据时间范围查询
     */
    List<AppLog> findByDtTimeBetween(Long startTime, Long endTime);

    /**
     * 根据索引名称查询
     */
    List<AppLog> findByIndex(String index);
}