package com.palmnest.webapp.quartz;

import com.palmnest.service.wechat.WeChatAccessManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Slf4j
@Controller
@RequestMapping("/updateAccessTokenWeb/*")
@Component("updateAccessTokenTimerTask")
public class UpdateAccessTokenTimerTask {


	@Autowired
	private WeChatAccessManager weChatAccessManager;

	public void run() {
		log.info("quartz into UpdateAccessTokenTimerTask ...");
		weChatAccessManager.updateAccessToken();
		log.info("quartz into UpdateAccessTokenTimerTask end ...");
	}
}
