fix(1.5.0-beta1): 优化sql
This commit is contained in:
parent
00591f2b5e
commit
d89862f824
@ -97,7 +97,7 @@ public class JobClearLogSchedule extends AbstractSchedule implements Lifecycle {
|
|||||||
private List<JobPartitionTaskDTO> jobTaskBatchList(Long startId, LocalDateTime endTime) {
|
private List<JobPartitionTaskDTO> jobTaskBatchList(Long startId, LocalDateTime endTime) {
|
||||||
|
|
||||||
List<JobTaskBatch> jobTaskBatchList = jobTaskBatchMapper.selectPage(
|
List<JobTaskBatch> jobTaskBatchList = jobTaskBatchMapper.selectPage(
|
||||||
new Page<>(0, 1000),
|
new Page<>(0, 1000, Boolean.FALSE),
|
||||||
new LambdaUpdateWrapper<JobTaskBatch>()
|
new LambdaUpdateWrapper<JobTaskBatch>()
|
||||||
.ge(JobTaskBatch::getId, startId)
|
.ge(JobTaskBatch::getId, startId)
|
||||||
.le(JobTaskBatch::getCreateDt, endTime)
|
.le(JobTaskBatch::getCreateDt, endTime)
|
||||||
|
@ -72,7 +72,7 @@ public abstract class AbstractRetryTaskAlarmSchedule extends AbstractSchedule im
|
|||||||
*/
|
*/
|
||||||
protected List<RetrySceneConfigPartitionTask> queryPartitionList(Long startId) {
|
protected List<RetrySceneConfigPartitionTask> queryPartitionList(Long startId) {
|
||||||
List<RetrySceneConfig> retrySceneConfigList = accessTemplate.getSceneConfigAccess()
|
List<RetrySceneConfig> retrySceneConfigList = accessTemplate.getSceneConfigAccess()
|
||||||
.listPage(new PageDTO<>(0, 500),
|
.listPage(new PageDTO<>(0, 500, Boolean.FALSE),
|
||||||
new LambdaQueryWrapper<RetrySceneConfig>()
|
new LambdaQueryWrapper<RetrySceneConfig>()
|
||||||
.gt(RetrySceneConfig::getId, startId)
|
.gt(RetrySceneConfig::getId, startId)
|
||||||
.eq(RetrySceneConfig::getSceneStatus, StatusEnum.YES.getStatus())
|
.eq(RetrySceneConfig::getSceneStatus, StatusEnum.YES.getStatus())
|
||||||
|
@ -347,7 +347,7 @@ public class GroupConfigServiceImpl implements GroupConfigService {
|
|||||||
|
|
||||||
List<GroupConfigRequestVO> allRequestList = Lists.newArrayList();
|
List<GroupConfigRequestVO> allRequestList = Lists.newArrayList();
|
||||||
PartitionTaskUtils.process((startId -> {
|
PartitionTaskUtils.process((startId -> {
|
||||||
List<GroupConfig> groupConfigs = accessTemplate.getGroupConfigAccess().listPage(new PageDTO<>(0, 100),
|
List<GroupConfig> groupConfigs = accessTemplate.getGroupConfigAccess().listPage(new PageDTO<>(0, 100, Boolean.FALSE),
|
||||||
new LambdaQueryWrapper<GroupConfig>()
|
new LambdaQueryWrapper<GroupConfig>()
|
||||||
.ge(GroupConfig::getId, startId)
|
.ge(GroupConfig::getId, startId)
|
||||||
.eq(GroupConfig::getNamespaceId, namespaceId)
|
.eq(GroupConfig::getNamespaceId, namespaceId)
|
||||||
|
@ -279,7 +279,7 @@ public class JobServiceImpl implements JobService {
|
|||||||
|
|
||||||
List<JobRequestVO> requestList = new ArrayList<>();
|
List<JobRequestVO> requestList = new ArrayList<>();
|
||||||
PartitionTaskUtils.process(startId -> {
|
PartitionTaskUtils.process(startId -> {
|
||||||
List<Job> jobList = jobMapper.selectPage(new PageDTO<>(0, 100),
|
List<Job> jobList = jobMapper.selectPage(new PageDTO<>(0, 100, Boolean.FALSE),
|
||||||
new LambdaQueryWrapper<Job>()
|
new LambdaQueryWrapper<Job>()
|
||||||
.eq(Job::getNamespaceId, namespaceId)
|
.eq(Job::getNamespaceId, namespaceId)
|
||||||
.eq(StrUtil.isNotBlank(exportJobVO.getGroupName()), Job::getGroupName, exportJobVO.getGroupName())
|
.eq(StrUtil.isNotBlank(exportJobVO.getGroupName()), Job::getGroupName, exportJobVO.getGroupName())
|
||||||
|
@ -109,7 +109,7 @@ public class NotifyRecipientServiceImpl implements NotifyRecipientService {
|
|||||||
List<NotifyRecipientRequestVO> requestList = new ArrayList<>();
|
List<NotifyRecipientRequestVO> requestList = new ArrayList<>();
|
||||||
String namespaceId = UserSessionUtils.currentUserSession().getNamespaceId();
|
String namespaceId = UserSessionUtils.currentUserSession().getNamespaceId();
|
||||||
PartitionTaskUtils.process(startId -> {
|
PartitionTaskUtils.process(startId -> {
|
||||||
List<NotifyRecipient> recipients = notifyRecipientMapper.selectPage(new PageDTO<>(0, 100),
|
List<NotifyRecipient> recipients = notifyRecipientMapper.selectPage(new PageDTO<>(0, 100, Boolean.FALSE),
|
||||||
new LambdaQueryWrapper<NotifyRecipient>()
|
new LambdaQueryWrapper<NotifyRecipient>()
|
||||||
.eq(NotifyRecipient::getNamespaceId, namespaceId)
|
.eq(NotifyRecipient::getNamespaceId, namespaceId)
|
||||||
.eq(Objects.nonNull(exportVO.getNotifyType()), NotifyRecipient::getNotifyType,
|
.eq(Objects.nonNull(exportVO.getNotifyType()), NotifyRecipient::getNotifyType,
|
||||||
|
@ -205,7 +205,7 @@ public class SceneConfigServiceImpl implements SceneConfigService {
|
|||||||
|
|
||||||
PartitionTaskUtils.process(startId -> {
|
PartitionTaskUtils.process(startId -> {
|
||||||
List<RetrySceneConfig> sceneConfigs = accessTemplate.getSceneConfigAccess()
|
List<RetrySceneConfig> sceneConfigs = accessTemplate.getSceneConfigAccess()
|
||||||
.listPage(new PageDTO<>(0, 500), new LambdaQueryWrapper<RetrySceneConfig>()
|
.listPage(new PageDTO<>(0, 500, Boolean.FALSE), new LambdaQueryWrapper<RetrySceneConfig>()
|
||||||
.eq(RetrySceneConfig::getNamespaceId, UserSessionUtils.currentUserSession().getNamespaceId())
|
.eq(RetrySceneConfig::getNamespaceId, UserSessionUtils.currentUserSession().getNamespaceId())
|
||||||
.eq(Objects.nonNull(exportSceneVO.getSceneStatus()), RetrySceneConfig::getSceneStatus, exportSceneVO.getSceneStatus())
|
.eq(Objects.nonNull(exportSceneVO.getSceneStatus()), RetrySceneConfig::getSceneStatus, exportSceneVO.getSceneStatus())
|
||||||
.eq(StrUtil.isNotBlank(exportSceneVO.getGroupName()),
|
.eq(StrUtil.isNotBlank(exportSceneVO.getGroupName()),
|
||||||
|
@ -325,7 +325,7 @@ public class WorkflowServiceImpl implements WorkflowService {
|
|||||||
|
|
||||||
List<WorkflowDetailResponseVO> resultList = new ArrayList<>();
|
List<WorkflowDetailResponseVO> resultList = new ArrayList<>();
|
||||||
PartitionTaskUtils.process(startId -> {
|
PartitionTaskUtils.process(startId -> {
|
||||||
List<Workflow> workflowList = workflowMapper.selectPage(new PageDTO<>(0, 100),
|
List<Workflow> workflowList = workflowMapper.selectPage(new PageDTO<>(0, 100, Boolean.FALSE),
|
||||||
new LambdaQueryWrapper<Workflow>()
|
new LambdaQueryWrapper<Workflow>()
|
||||||
.eq(Workflow::getNamespaceId, UserSessionUtils.currentUserSession().getNamespaceId())
|
.eq(Workflow::getNamespaceId, UserSessionUtils.currentUserSession().getNamespaceId())
|
||||||
.eq(Workflow::getDeleted, StatusEnum.NO.getStatus())
|
.eq(Workflow::getDeleted, StatusEnum.NO.getStatus())
|
||||||
|
Loading…
Reference in New Issue
Block a user