package com.ruoyi.web.controller.common; import com.ruoyi.system.mapper.PoTetherMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.Scheduled; import java.util.Date; @Configuration @EnableScheduling public class SpringTaskConfig { @Autowired PoTetherMapper poTetherMapper; @Scheduled(cron = "0/5 * * * * ?") public void cron() { Integer i = poTetherMapper.updateSellStatus(); System.out.println(i); } }