Merge branch 'refs/heads/release/3.0' into dev/dev_xp

# Conflicts:
#	src/main/java/com/ai/da/common/utils/RedisUtil.java
#	src/main/java/com/ai/da/service/impl/AccountServiceImpl.java
#	src/main/java/com/ai/da/service/impl/PortfolioServiceImpl.java
This commit is contained in:
2024-09-24 10:27:18 +08:00
12 changed files with 190 additions and 61 deletions

View File

@@ -31,20 +31,20 @@ public class AccountTask {
}
// 每天凌晨0点执行一次
// @Scheduled(cron = "0 0 0 * * ?")
@Scheduled(cron = "0 0 0 * * ?")
public void cancelActivityBenefits(){
// 1、查询当前所有参与了活动且过期的用户
List<Account> accountList = accountService.getExpiredUserBySystemUser(4);
// 2、将到期用户置为游客
for(Account account : accountList){
log.info("参与活动的用户到期,置为游客");
log.info("参与活动的用户{} : {} 于 {} 账号有效期到期,置为游客",account.getId(),account.getUserEmail(),account.getValidEndTime());
accountService.toVisitor(account);
}
}
// 每天检测正式用户到期情况每天凌晨0点执行
// @Scheduled(cron = "0 0 0 * * ?")
@Scheduled(cron = "0 0 0 * * ?")
public void paidUserToVisitor(){
// 1、查询当前已过期正式用户或试用用户
List<Account> accountList = accountService.getExpiredUserBySystemUser(1);
@@ -53,7 +53,7 @@ public class AccountTask {
// 2、将到期用户置为游客
for(Account account : accountList){
log.info("用户有效期到期,置为游客");
log.info("用户{} : {} 于 {}账号有效期到期,置为游客", account.getId(), account.getUserEmail(),account.getValidEndTime());
accountService.toVisitor(account);
}
}