Browse Source

Merge branch 'develop' into release_temp

master
zhaoqifeng 4 years ago
parent
commit
c8a722f4ca
  1. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectServiceImpl.java
  2. 5
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrVistRecordServiceImpl.java

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectServiceImpl.java

@ -827,7 +827,7 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao,
result.setRedPoint(NumConstant.ONE_STR);
return result;
}
if (list.get(0).getCreatedTime().compareTo(visitRecord.getCreatedTime()) > 0) {
if (list.get(0).getCreatedTime().compareTo(visitRecord.getUpdatedTime()) > 0) {
result.setRedPoint(NumConstant.ONE_STR);
} else {
result.setRedPoint(NumConstant.ZERO_STR);

5
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrVistRecordServiceImpl.java

@ -115,12 +115,13 @@ public class PrVistRecordServiceImpl extends BaseServiceImpl<PrVistRecordDao, Pr
public PrVistRecordDTO getNewestRecord(String staffId) {
LambdaQueryWrapper<PrVistRecordEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PrVistRecordEntity::getUserId, staffId);
wrapper.orderByDesc(PrVistRecordEntity::getCreatedTime);
wrapper.orderByDesc(PrVistRecordEntity::getUpdatedTime);
wrapper.last("limit 1");
List<PrVistRecordEntity> list = baseDao.selectList(wrapper);
if (CollectionUtils.isEmpty(list)) {
return null;
}
return ConvertUtils.sourceToTarget(list, PrVistRecordDTO.class).get(0);
return ConvertUtils.sourceToTarget(list.get(0), PrVistRecordDTO.class);
}
}
Loading…
Cancel
Save