diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/BillingDataServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/BillingDataServiceImpl.java index 8ef679eb4..5dd46f80f 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/BillingDataServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/BillingDataServiceImpl.java @@ -34,7 +34,7 @@ public class BillingDataServiceImpl implements IBillingDataService { @Override public BillingDataVO getBillingData() { - LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); + LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime).last("limit 1")); XxlJobQueryVO init = JSON.parseObject(largeScreenDataEntity.getData(), XxlJobQueryVO.class); @@ -43,7 +43,7 @@ public class BillingDataServiceImpl implements IBillingDataService { @Override public List getWarehouseBillingData() { - LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); + LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime).last("limit 1")); XxlJobQueryVO init = JSON.parseObject(largeScreenDataEntity.getData(), XxlJobQueryVO.class); @@ -58,7 +58,7 @@ public class BillingDataServiceImpl implements IBillingDataService { @Override public List getMonthBillingData() { - LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime)); + LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime).last("limit1")); if (largeScreenDataEntity == null) { return new ArrayList<>();