更新 MonitorService.java

pull/1/head
wangsiyuan 2023-12-14 12:46:57 +08:00
parent 71d5b10011
commit b277822315
1 changed files with 11 additions and 9 deletions

View File

@ -9,7 +9,6 @@ import com.kimgo.wepush.request.SendQyWeChatMsgRequest;
import com.kimgo.wepush.response.QyWeChatSendMessageApiResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
@ -20,15 +19,18 @@ import java.util.List;
@Service
public class MonitorService {
@Autowired
private ApiSettingService apiSettingService;
@Autowired
private QyWeChatURLService qyWeChatURLService;
@Autowired
private TokenService tokenService;
private final ApiSettingService apiSettingService;
private final QyWeChatURLService qyWeChatURLService;
private final TokenService tokenService;
private final Logger logger = LoggerFactory.getLogger(MonitorService.class);
@Autowired
private DeviceInfoDAOMapper deviceInfoDAOMapper;
private final DeviceInfoDAOMapper deviceInfoDAOMapper;
public MonitorService(ApiSettingService apiSettingService, QyWeChatURLService qyWeChatURLService, TokenService tokenService, DeviceInfoDAOMapper deviceInfoDAOMapper) {
this.apiSettingService = apiSettingService;
this.qyWeChatURLService = qyWeChatURLService;
this.tokenService = tokenService;
this.deviceInfoDAOMapper = deviceInfoDAOMapper;
}
@Scheduled(fixedDelay = 480000)
public void monitorOnlineDevices() {