package com.usky.cdi.controller.api;

import com.usky.cdi.AlarmDataSyncTaskService;
import com.usky.cdi.service.impl.AlarmDataSyncService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * 多租户定时任务API接口
 *
 * @author usky
 * @since 2025-12-29
 */
@Slf4j
@RestController
public class AlarmDataSyncTaskApi implements AlarmDataSyncTaskService {

    @Autowired
    private AlarmDataSyncService alarmDataSyncService;

    /**
     * 同步告警数据
     * tenantId: 租户ID
     * engineeringId: 工程ID
     * username: mqtt用户名
     * password: mqtt密码
     * status: peacetime:平时 wartime:战时
     */
    @Override
    public void synchronizeAlarmData(Integer tenantId, Long engineeringId, String username, String password, String status) {
        alarmDataSyncService.synchronizeAlarmData(tenantId, engineeringId, username, password, status);
    }
}