diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcDangerAreaServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcDangerAreaServiceImpl.java index 0c56f212f7..ab3cd225a4 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcDangerAreaServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcDangerAreaServiceImpl.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; @@ -92,7 +93,8 @@ public class IcDangerAreaServiceImpl extends BaseServiceImpl result = new PageData<>(); LambdaQueryWrapper qr = new LambdaQueryWrapper<>(); qr.like(StringUtils.isNotBlank(formDTO.getName()),IcDangerAreaEntity::getAllName,formDTO.getName()) - .eq(StringUtils.isNotBlank(formDTO.getDangerLevel()),IcDangerAreaEntity::getDangerLevel,formDTO.getDangerLevel()); + .eq(StringUtils.isNotBlank(formDTO.getDangerLevel()),IcDangerAreaEntity::getDangerLevel,formDTO.getDangerLevel()) + .orderByDesc(BaseEpmetEntity::getCreatedTime); if (formDTO.getIsPage()){ PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectList(qr)); result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal())));