package vip.xiaonuo.Timer;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import vip.xiaonuo.common.timer.CommonTimerTaskRunner;
import vip.xiaonuo.modular.ai.warningRemind.entity.WarningRemind;
import vip.xiaonuo.modular.ai.warningRemind.mapper.WarningRemindMapper;
import vip.xiaonuo.modular.ai.warningRemind.service.WarningRemindService;

@Slf4j
@Component
public class WarningRemindTimer implements CommonTimerTaskRunner {
    @Autowired
    private WarningRemindService warningRemindService;

    @Override
    public void action() {
        warningRemindService.update(new UpdateWrapper<WarningRemind>().lambda().set(WarningRemind::getTodayNoRemind,0));
    }
}
