liusuyi
2026-05-18 0b8c8d8986a35c3e36db1503125e2dff79d6d10e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.ard.qs.runner;
 
import com.ard.qs.service.IQsDeviceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
 
/**
 * 启动服务
 *
 * @FileName QsCommandLineRunner
 * @Description
 * @Author fengcheng
 * @date 2026-04-08
 **/
@Component
@Slf4j
public class QsCommandLineRunner implements CommandLineRunner, DisposableBean {
 
    @Autowired
    private IQsDeviceService qsDeviceService;
 
 
    @Override
    public void destroy() throws Exception {
 
    }
 
    @Override
    public void run(String... args) throws Exception {
        log.info("启动服务==>修改所有设备播状态离线和设备状态离线");
        qsDeviceService.updateAllQsDevicesToOffline();
 
        qsDeviceService.task();
    }
}