package com.mosty.yjzl.task;

import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.mosty.base.model.entity.yjzl.TbYjxx;
import com.mosty.base.utils.Constant;
import com.mosty.common.redis.service.RedisService;
import lombok.AllArgsConstructor;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * 每天清除前一天redis中得数据
 */
@Component
@AllArgsConstructor
public class LzYjxxRedisClearTask {

    private final RedisTemplate redisTemplate;

    @Scheduled(cron = "0 0 0 * * ? ")
    public void run() {
        redisTemplate.delete(Constant.LZYJ_DATA_PQRY);
        redisTemplate.delete(Constant.LZYJ_DATA_SWRY);
        redisTemplate.delete(Constant.LZYJ_DATA_QKSD);
    }
}
