package com.yinlihupo.enlish.service.task;


import com.yinlihupo.enlish.service.service.RoleService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


@Component
@Slf4j
public class UserRoleTask {

    @Resource
    private RoleService roleService;

    @Scheduled(cron = "0 0 1 * * ?")
    public void PushRolePermissions2Redis() {
        log.info("定时任务，将系统权限推送到 redis 中");
        roleService.pushRolePermission2Redis();
    }
}
