Browse Source

#MOD 首页统计

谭斌 2 năm trước cách đây
mục cha
commit
da46f6ae4e

+ 2 - 2
device-api-service-merc-mini/src/main/java/com/xy/controller/MercMiniDeviceHomePageController.java

@@ -54,7 +54,7 @@ public class MercMiniDeviceHomePageController {
             day.setDayRefundMoney(todayRefundMoney);
             day.setSalesPrice(mercDataOneDay.stream().mapToInt(DeviceDataDto.Vo::getSalesMoney).sum() - todayRefundMoney);
             day.setOrderNum(mercDataOneDay.stream().mapToInt(DeviceDataDto.Vo::getSalesCount).sum());
-            day.setRefundMoney(mercDataOneDay.stream().mapToInt(DeviceDataDto.Vo::getRefundMoney).sum());
+            day.setRefundMoney(hisRefundMoney + todayRefundMoney);
         }
         vo.setDay(day);
         //当月
@@ -66,7 +66,7 @@ public class MercMiniDeviceHomePageController {
             Integer monthRefundMoney = countByMonthVO.getMonthRefundMoney();
             month.setSalesPrice(mercDataOneMonth.stream().mapToInt(DeviceDataDto.Vo::getSalesMoney).sum() - monthRefundMoney);
             month.setOrderNum(mercDataOneMonth.stream().mapToInt(DeviceDataDto.Vo::getSalesCount).sum());
-            month.setRefundMoney(mercDataOneMonth.stream().mapToInt(DeviceDataDto.Vo::getRefundMoney).sum());
+            month.setRefundMoney(hisMonthRefundMoney + monthRefundMoney);
             month.setMonthRefundMoney(monthRefundMoney);
             month.setMonthHisRefundMoney(hisMonthRefundMoney);
         }