|
|
@@ -94,7 +94,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
* 注册账号数据
|
|
|
*/
|
|
|
private void getRegisterAccountData(BackgroundDataView backgroundDataView, Date startDate, Date endDate) {
|
|
|
- if (DateUtil.beginOfDay(DateTime.now()).equals(startDate) && DateUtil.endOfDay(DateTime.now()).equals(endDate)) {
|
|
|
+ if (DateUtil.beginOfDay(DateTime.now()).equals(startDate) && DateUtil.beginOfDay(DateUtil.offsetDay(DateTime.now(),1)).equals(endDate)) {
|
|
|
backgroundDataView.setRegisterAccountDataViews(statistics.statisticsRegisterAccountData(startDate, endDate, true));
|
|
|
}else {
|
|
|
List<RegisterAccountData> registerAccountData = realGoodsDataMapper.statisticsRegisterAccountData(startDate, endDate);
|
|
|
@@ -134,7 +134,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
|
|
|
private void getAppleOneDataView(BackgroundDataView backgroundDataView, Date startDate, Date endDate) {
|
|
|
List<AppleOneData> appleOneData = appleOneDataMapper.statisticsAppleOneData(startDate, endDate);
|
|
|
- if (DateUtil.beginOfDay(DateTime.now()).equals(startDate) && DateUtil.endOfDay(DateTime.now()).equals(endDate)) {
|
|
|
+ if (DateUtil.beginOfDay(DateTime.now()).equals(startDate) && DateUtil.beginOfDay(DateUtil.offsetDay(DateTime.now(),1)).equals(endDate)) {
|
|
|
backgroundDataView.setAppleOneDataViews(statistics.statisticsAppleOneData(startDate, endDate, true));
|
|
|
}else {
|
|
|
backgroundDataView.setAppleOneDataViews(appleOneData);
|
|
|
@@ -142,7 +142,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
}
|
|
|
|
|
|
private void getStreamingAccountDataView(BackgroundDataView backgroundDataView, Date startDate, Date endDate) {
|
|
|
- if (DateUtil.beginOfDay(DateTime.now()).equals(startDate) && DateUtil.endOfDay(DateTime.now()).equals(endDate)) {
|
|
|
+ if (DateUtil.beginOfDay(DateTime.now()).equals(startDate) && DateUtil.beginOfDay(DateUtil.offsetDay(DateTime.now(),1)).equals(endDate)) {
|
|
|
backgroundDataView.setStreamAccountDataViews(statistics.statisticsStreamingAccountData(startDate, endDate, true));
|
|
|
}else {
|
|
|
List<StreamingAccountData> streamingAccountData = streamingAccountDataMapper.statisticsStreamingData(startDate, endDate);
|
|
|
@@ -157,8 +157,10 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
}
|
|
|
|
|
|
private void getRealGoodsData(BackgroundDataView backgroundDataView, Date startDate, Date endDate) {
|
|
|
- if (DateUtil.beginOfDay(DateTime.now()).equals(startDate) && DateUtil.endOfDay(DateTime.now()).equals(endDate)) {
|
|
|
- backgroundDataView.setRealGoodsDataViews(statistics.statisticsRealGoodsData(startDate, endDate, true));
|
|
|
+ if (DateUtil.beginOfDay(DateTime.now()).equals(startDate) && DateUtil.beginOfDay(DateUtil.offsetDay(DateTime.now(),1)).equals(endDate)) {
|
|
|
+ List<RealGoodsData> realGoodsData = statistics.statisticsRealGoodsData(startDate, endDate, true);
|
|
|
+ List<RealGoodsData> collect = realGoodsData.stream().filter(data -> data.getNumOfUser() != 0).collect(Collectors.toList());
|
|
|
+ backgroundDataView.setRealGoodsDataViews(collect);
|
|
|
}else {
|
|
|
List<RealGoodsData> realGoodsData = realGoodsDataMapper.statisticsRealGoodsData(startDate, endDate);
|
|
|
Optional.ofNullable(realGoodsData).ifPresent(list -> list.forEach(data -> {
|