| | |
| | | |
| | | |
| | | import com.ruoyi.goods.service.activity.ActivityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import lombok.extern.log4j.Log4j2; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | @Component |
| | | @Slf4j |
| | | @Log4j2 |
| | | public class ActivityScheduler { |
| | | |
| | | |
| | |
| | | private ActivityService activityService; |
| | | |
| | | /** |
| | | * 活动定时开始 |
| | | * 每1小时检查活动定时开始 |
| | | */ |
| | | @Scheduled(cron="0 * */1 * * ?") |
| | | @Scheduled(cron="0 0 */1 * * ?") |
| | | private void timingSendCoupon(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("活动定时任务开始执行"); |