|
@@ -2,22 +2,24 @@ package com.ruoyi.web.controller.common;
|
|
|
|
|
|
|
|
|
import com.ruoyi.system.mapper.PoTetherMapper;
|
|
|
+import com.ruoyi.system.service.IPoCollectionService;
|
|
|
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;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ IPoCollectionService collectionService;
|
|
|
+
|
|
|
@Scheduled(cron = "0/5 * * * * ?")
|
|
|
- public void cron() {
|
|
|
- Integer i = poTetherMapper.updateSellStatus();
|
|
|
- System.out.println(i);
|
|
|
+ public void cron() {
|
|
|
+ poTetherMapper.updateSellStatus();
|
|
|
+ collectionService.updateCollectionStatus();
|
|
|
}
|
|
|
}
|