parent
7825799119
commit
2e1d651fb5
@ -0,0 +1,29 @@
|
|||||||
|
package com.ruoyi.zhiyuanzhe.quartz;
|
||||||
|
|
||||||
|
import com.ruoyi.zhiyuanzhe.service.IBDistributionRecordsService;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时任务同步志愿者数据
|
||||||
|
*
|
||||||
|
* @author dong
|
||||||
|
* @since 2024/2/29 11:25
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@EnableScheduling
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public class VolunteerQuartz {
|
||||||
|
@Resource
|
||||||
|
private IBDistributionRecordsService bDistributionRecordsService;
|
||||||
|
@Scheduled(cron = "0 0 4 * * ?")
|
||||||
|
public void volunteer() {
|
||||||
|
bDistributionRecordsService.volunteer();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue