package com.testor.module.video.job;

import com.testor.module.video.service.VideoDeviceNumberService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

public class VideoInfoHandler extends IJobHandler {
	@Override
	public void execute() throws Exception {

	}

	private static final Logger logger = LoggerFactory.getLogger(VideoInfoHandler.class);

	@Autowired
	private VideoDeviceNumberService videoDeviceNumberService;

	@XxlJob("VideoInfoHandler")
	public ReturnT<String> execute(String s) throws Exception {
		logger.info("监控设备信息同步更新定时任务启动，启动参数：{}", s);
		videoDeviceNumberService.batchInsert();
		return ReturnT.SUCCESS;
	}
}
