package com.ics.quartz.task;

import com.ics.admin.domain.meeting.Equipment;
import com.ics.admin.service.meeting.IEquipmentService;
import com.ics.common.utils.DeviceUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Slf4j
@Component("visitorPersonTask")
public class VisitorPersonTask {

    @Autowired
    private IEquipmentService equipmentService;


    /**
     * 删除已经过期的访客信息
     */
    public void deleteExpiredVisitorPerson(){
        List<Equipment> equipment = equipmentService.selectEquipmentList(new Equipment());
        for (Equipment equipment1 : equipment) {
            String cleanExpiredPersonConfig = DeviceUtils.getCleanExpiredPersonConfig(equipment1.getIp());
            log.info("清除过期访客信息配置：{}",cleanExpiredPersonConfig);
        }

    }
}
