package com.usky.cdi.service;

import com.usky.cdi.domain.CdiDeliveryLog;
import com.usky.cdi.service.vo.SyncTaskStatisticsVO;
import com.usky.common.core.bean.CommonPage;
import com.usky.common.mybatis.core.CrudService;
import org.springframework.scheduling.annotation.Async;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 人防_投递日志表（记录数据的MQTT投递情况） 服务类
 * </p>
 *
 * @author fu
 * @since 2026-02-02
 */
public interface CdiDeliveryLogService extends CrudService<CdiDeliveryLog> {

    List<SyncTaskStatisticsVO> selectById(Long id);

    CommonPage<CdiDeliveryLog> logList(Long id, Integer pageNum, Integer pageSize, Integer dataType, Integer logType, String startTime, String endTime);

    void synchronizeData(SyncTaskStatisticsVO vo);

    // 存储日志
    void saveLog(String topic, String dataTypeName, Integer dataType, Integer tenantId, Long engineeringId, LocalDateTime now, long startTime, long endTime,
                 int total, int success, int failure, int notSynced, int pushFlag, String userName);
}
