添加查询Code-Create数据库,监控新增付费记录并对付费用户进行账号新增或延长账号有效期的操作
This commit is contained in:
26
src/main/java/com/ai/da/common/task/AccountTask.java
Normal file
26
src/main/java/com/ai/da/common/task/AccountTask.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package com.ai.da.common.task;
|
||||
|
||||
import com.ai.da.service.AccountService;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Component
|
||||
public class AccountTask {
|
||||
|
||||
@Resource
|
||||
private AccountService accountService;
|
||||
|
||||
/** 每个月1号凌晨刷新 年付用户的积分 */
|
||||
// @Scheduled(cron = "0 0 0 1 * ?")
|
||||
public void refreshCreditsMonthly(){
|
||||
accountService.refreshCreditsMonthly();
|
||||
}
|
||||
|
||||
// todo 多久执行一次?
|
||||
public void getPaidUser(){
|
||||
// 获取code-create 表中 指定日期之后 订单状态为wc-processing的订单
|
||||
accountService.extendValidityForCC();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user