/**
 * Copyright (c) 2020 fumeiai All rights reserved.
 *
 *
 *
 * 版权所有，侵权必究！
 */

package com.lz.modules.job.task;

import com.lz.common.utils.DateUtils;
import com.lz.modules.job.business.DingtalkBusiness;
import com.lz.modules.job.business.FeishuBusiness;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 获取飞钉钉组织架构信息定时任务
 *
 * getFeishuDepartmentsJob为spring bean的名称
 *
 * @author fumeiai 20200429
 */
@Component("dingtalkSynDataJob")
public class DingtalkSynDataJob implements ITask {
	private Logger logger = LoggerFactory.getLogger(getClass());

	@Autowired
	DingtalkBusiness dingtalkBusiness;
	@Value("${dingtalk.appid}")
	private String appid;
	@Override
	public void run(String params) {

		logger.info("dingtalkSynDataJob start date == {}", DateUtils.getCurrentDate());
		dingtalkBusiness.getDingTalkepartmentsIntoData(appid);
		logger.info("dingtalkSynDataJob end date == {}", DateUtils.getCurrentDate());

	}

}
