1
This commit is contained in:
parent
f11b8a556f
commit
aa7998837a
27
ruoyi-admin/src/main/java/com/ruoyi/task/DlTask.java
Normal file
27
ruoyi-admin/src/main/java/com/ruoyi/task/DlTask.java
Normal file
@ -0,0 +1,27 @@
|
||||
package com.ruoyi.task;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.member.service.IMemberRightsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 定时任务调度
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Component("dlTask")
|
||||
public class DlTask{
|
||||
@Autowired
|
||||
private IMemberRightsService memberRightsService;
|
||||
|
||||
public void resetDay(){
|
||||
System.out.println("执行权益-每天定时任务");
|
||||
memberRightsService.reset("day");
|
||||
}
|
||||
|
||||
public void resetMonth(){
|
||||
System.out.println("执行权益-每月定时任务");
|
||||
memberRightsService.reset("month");
|
||||
}
|
||||
}
|
@ -163,7 +163,7 @@ public class Constants
|
||||
/**
|
||||
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
|
||||
*/
|
||||
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi.quartz.task" };
|
||||
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi.quartz.task","com.ruoyi.task" };
|
||||
|
||||
/**
|
||||
* 定时任务违规的字符
|
||||
|
Loading…
Reference in New Issue
Block a user