update 调整 数据排序规则

This commit is contained in:
疯狂的狮子Li 2024-02-27 00:42:00 +08:00
parent 448cd53734
commit 3ace3643cc
4 changed files with 5 additions and 0 deletions

View File

@ -76,6 +76,7 @@ public class ActProcessDefinitionServiceImpl implements IActProcessDefinitionSer
if (StringUtils.isNotEmpty(processDefinitionBo.getName())) {
query.processDefinitionNameLike("%" + processDefinitionBo.getName() + "%");
}
query.orderByDeploymentId().desc();
// 分页查询
List<ProcessDefinitionVo> processDefinitionVoList = new ArrayList<>();
List<ProcessDefinition> definitionList = query.latestVersion().listPage(processDefinitionBo.getPageNum(), processDefinitionBo.getPageSize());

View File

@ -112,6 +112,7 @@ public class ActProcessInstanceServiceImpl implements IActProcessInstanceService
if (StringUtils.isNotBlank(processInstanceBo.getCategoryCode())) {
query.processDefinitionCategory(processInstanceBo.getCategoryCode());
}
query.orderByStartTime().desc();
List<ProcessInstance> processInstances = query.listPage(processInstanceBo.getPageNum(), processInstanceBo.getPageSize());
for (ProcessInstance processInstance : processInstances) {
ProcessInstanceVo processInstanceVo = BeanUtil.toBean(processInstance, ProcessInstanceVo.class);

View File

@ -278,6 +278,7 @@ public class ActTaskServiceImpl implements IActTaskService {
if (StringUtils.isNotBlank(taskBo.getProcessDefinitionKey())) {
query.processDefinitionKey(taskBo.getProcessDefinitionKey());
}
query.orderByTaskCreateTime().desc();
List<Task> taskList = query.listPage(taskBo.getPageNum(), taskBo.getPageSize());
List<ProcessInstance> processInstanceList = null;
if (CollUtil.isNotEmpty(taskList)) {

View File

@ -8,6 +8,7 @@ import lombok.RequiredArgsConstructor;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StreamUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.workflow.domain.TestLeave;
@ -75,6 +76,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
lqw.eq(StringUtils.isNotBlank(bo.getLeaveType()), TestLeave::getLeaveType, bo.getLeaveType());
lqw.ge(bo.getStartLeaveDays() != null,TestLeave::getLeaveDays, bo.getStartLeaveDays());
lqw.le(bo.getEndLeaveDays() != null,TestLeave::getLeaveDays, bo.getEndLeaveDays());
lqw.orderByDesc(BaseEntity::getCreateTime);
return lqw;
}