package com.iformall.schedule;

import com.iformall.mapper.WxCuserFloatingLayerMapper;
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 WxCuserFloatingLayerMapper wxCuserFloatingLayerMapper;


    /**
     * 每天23点执行
     */
    @Scheduled(cron = "0 0 23 * * ?")
    public void sendMsg() {
        logger.info("删除浮层用户数据开始");
        wxCuserFloatingLayerMapper.delete(null);
        logger.info("删除浮层用户数据结束");
    }


}