| @@ -0,0 +1,34 @@ | |||||
| package com.iformall.schedule; | |||||
| import com.iformall.mapper.WxFloatingLayerMapper; | |||||
| 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.Component; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @Component | |||||
| public class FloatingLayerSchedule { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| private WxFloatingLayerMapper wxFloatingLayerMapper; | |||||
| /** | |||||
| * 每天0点5分执行 | |||||
| */ | |||||
| @Scheduled(cron = "0 48 10 * * ?") | |||||
| public void sendMsg() { | |||||
| logger.info("删除前一天浮层用户数据开始"); | |||||
| wxFloatingLayerMapper.delete(null); | |||||
| logger.info("删除前一天浮层用户数据结束"); | |||||
| } | |||||
| } | |||||