From 7f7c4d2b158bf8460472169ee6b0f9350033f8b0 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 28 Apr 2022 09:18:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E7=82=B9=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/activiti/service/impl/ActivitiServiceImpl.java | 6 +++--- .../main/resources/mapper/activiti/ProcessActivityDao.xml | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/impl/ActivitiServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/impl/ActivitiServiceImpl.java index 182aa006..316d9bda 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/impl/ActivitiServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/impl/ActivitiServiceImpl.java @@ -35,10 +35,10 @@ public class ActivitiServiceImpl extends BaseServiceImpl getTaskHandleDetailInfo(String processInstanceId) { List listEntity = baseDao.getTaskHandleDetailInfo(processInstanceId); - for(HistoryDetailEntity entity : listEntity){ - if(entity.getEndTime() != null && entity.getStartTime() != null){ + for (HistoryDetailEntity entity : listEntity) { + if (entity.getEndTime() != null && entity.getStartTime() != null) { long diff = entity.getEndTime().getTime() - entity.getStartTime().getTime(); - entity.setDurationInSeconds(diff/1000); + entity.setDurationInSeconds(diff / 1000); } } return ConvertUtils.sourceToTarget(listEntity, HistoryDetailDTO.class); diff --git a/renren-admin/src/main/resources/mapper/activiti/ProcessActivityDao.xml b/renren-admin/src/main/resources/mapper/activiti/ProcessActivityDao.xml index 4e7ef980..c51e9442 100644 --- a/renren-admin/src/main/resources/mapper/activiti/ProcessActivityDao.xml +++ b/renren-admin/src/main/resources/mapper/activiti/ProcessActivityDao.xml @@ -53,6 +53,8 @@ + ORDER BY + ahp.START_TIME_ DESC