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