BUGFIX;
This commit is contained in:
@@ -36,7 +36,7 @@ public class MyTaskScheduler {
|
|||||||
Long currentTimestamp = System.currentTimeMillis();
|
Long currentTimestamp = System.currentTimeMillis();
|
||||||
|
|
||||||
// 计算时间差(毫秒)
|
// 计算时间差(毫秒)
|
||||||
long timeDifference = currentTimestamp - timestamp;
|
long timeDifference = timestamp - currentTimestamp;
|
||||||
|
|
||||||
if (timeDifference < 0) {
|
if (timeDifference < 0) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ public class SendEmailUtil {
|
|||||||
// 根据邮件类型设置不同的主题和模板
|
// 根据邮件类型设置不同的主题和模板
|
||||||
String subject = "";
|
String subject = "";
|
||||||
Template template = new Template();
|
Template template = new Template();
|
||||||
subject = "Upcoming AiDA 3.0 Launch and Scheduled Maintenance";
|
subject = "Notice: AiDA 3.0 Website Maintenance Downtime";
|
||||||
template.setTemplateID(UPGRADE_NOTIFICATION_ID);
|
template.setTemplateID(UPGRADE_NOTIFICATION_ID);
|
||||||
template.setTemplateData(buildAccountData(account));
|
template.setTemplateData(buildAccountData(account));
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ai.da.controller;
|
package com.ai.da.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.ai.da.common.config.exception.BusinessException;
|
import com.ai.da.common.config.exception.BusinessException;
|
||||||
import com.ai.da.common.context.UserContext;
|
import com.ai.da.common.context.UserContext;
|
||||||
import com.ai.da.common.response.PageBaseResponse;
|
import com.ai.da.common.response.PageBaseResponse;
|
||||||
@@ -8,6 +9,7 @@ import com.ai.da.common.utils.CopyUtil;
|
|||||||
import com.ai.da.common.utils.MinioUtil;
|
import com.ai.da.common.utils.MinioUtil;
|
||||||
import com.ai.da.mapper.primary.TDesignPythonOutfitMapper;
|
import com.ai.da.mapper.primary.TDesignPythonOutfitMapper;
|
||||||
import com.ai.da.mapper.primary.entity.Account;
|
import com.ai.da.mapper.primary.entity.Account;
|
||||||
|
import com.ai.da.mapper.primary.entity.Library;
|
||||||
import com.ai.da.mapper.primary.entity.TDesignPythonOutfit;
|
import com.ai.da.mapper.primary.entity.TDesignPythonOutfit;
|
||||||
import com.ai.da.mapper.primary.entity.UserLikeGroup;
|
import com.ai.da.mapper.primary.entity.UserLikeGroup;
|
||||||
import com.ai.da.model.dto.*;
|
import com.ai.da.model.dto.*;
|
||||||
@@ -27,10 +29,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
@@ -49,6 +48,8 @@ public class SavedCollectionController {
|
|||||||
private TDesignPythonOutfitMapper designPythonOutfitMapper;
|
private TDesignPythonOutfitMapper designPythonOutfitMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private MinioUtil minioUtil;
|
private MinioUtil minioUtil;
|
||||||
|
@Resource
|
||||||
|
private ClassificationService classificationService;
|
||||||
|
|
||||||
@ApiOperation(value = "History用户分页分组列表")
|
@ApiOperation(value = "History用户分页分组列表")
|
||||||
@PostMapping("/queryUserGroup")
|
@PostMapping("/queryUserGroup")
|
||||||
@@ -67,6 +68,33 @@ public class SavedCollectionController {
|
|||||||
if (Objects.nonNull(query.getEndDate())) {
|
if (Objects.nonNull(query.getEndDate())) {
|
||||||
queryWrapper.le("update_date", new Date(query.getEndDate()));
|
queryWrapper.le("update_date", new Date(query.getEndDate()));
|
||||||
}
|
}
|
||||||
|
// 新增分类过滤
|
||||||
|
if (CollectionUtil.isNotEmpty(query.getClassificationIdList())) {
|
||||||
|
List<Long> historyIdList = new ArrayList<>();
|
||||||
|
if (query.getIntersection() == 0) {
|
||||||
|
for (Long classificationId : query.getClassificationIdList()) {
|
||||||
|
historyIdList.addAll(classificationService.getLibraryIdListByClassificationId(classificationId));
|
||||||
|
}
|
||||||
|
if (CollectionUtil.isNotEmpty(historyIdList)) {
|
||||||
|
queryWrapper.in("id", historyIdList);
|
||||||
|
}else {
|
||||||
|
return Response.success(PageBaseResponse.success(new Page<>()));
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
for (int i = 0; i < query.getClassificationIdList().size(); i++) {
|
||||||
|
List<Long> historyIdListByClassificationId = classificationService.getLibraryIdListByClassificationId(query.getClassificationIdList().get(i));
|
||||||
|
if (i == 0) {
|
||||||
|
historyIdList.addAll(historyIdListByClassificationId);
|
||||||
|
}else {
|
||||||
|
historyIdList.retainAll(historyIdListByClassificationId);
|
||||||
|
}
|
||||||
|
if (CollectionUtil.isEmpty(historyIdList)) {
|
||||||
|
return Response.success(PageBaseResponse.success(new Page<>()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
queryWrapper.in("id", historyIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
queryWrapper.orderByDesc("id");
|
queryWrapper.orderByDesc("id");
|
||||||
IPage<UserLikeGroup> page = userLikeGroupService.getBaseMapper().selectPage(
|
IPage<UserLikeGroup> page = userLikeGroupService.getBaseMapper().selectPage(
|
||||||
new Page<>(query.getPage(), query.getSize()), queryWrapper);
|
new Page<>(query.getPage(), query.getSize()), queryWrapper);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import lombok.Data;
|
|||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ApiModel("History分页查询")
|
@ApiModel("History分页查询")
|
||||||
@@ -20,4 +21,9 @@ public class QueryHistoryPageDTO extends PageQueryBaseVo {
|
|||||||
|
|
||||||
@ApiModelProperty("开始时间 时间戳")
|
@ApiModelProperty("开始时间 时间戳")
|
||||||
private Long endDate;
|
private Long endDate;
|
||||||
|
|
||||||
|
private List<Long> classificationIdList;
|
||||||
|
|
||||||
|
@ApiModelProperty("1交集2并集")
|
||||||
|
private Integer intersection;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -868,7 +868,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
public void upgradeNotification() {
|
public void upgradeNotification() {
|
||||||
QueryWrapper<Account> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<Account> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.and(wrapper ->
|
queryWrapper.and(wrapper ->
|
||||||
wrapper.gt("valid_end_time", 1706112000000L)
|
wrapper.gt("valid_end_time", 1709515797000L)
|
||||||
.or().isNull("valid_end_time"))
|
.or().isNull("valid_end_time"))
|
||||||
.isNotNull("user_email");
|
.isNotNull("user_email");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user