订单统计定时任务修改
This commit is contained in:
parent
c0aa412e0b
commit
34987a612f
|
|
@ -88,24 +88,25 @@ public class ShopOrderStatisticServiceImpl extends ServiceImpl<ShopOrderStatisti
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
countInfo.forEach((shopId, info) -> {
|
|
||||||
ShopOrderStatistic statistic = getOne(new QueryWrapper().eq(ShopOrderStatistic::getShopId, shopId).eq(ShopOrderStatistic::getCreateDay, yesterday.toSqlDate()));
|
|
||||||
if (statistic == null) {
|
|
||||||
statistic = new ShopOrderStatistic();
|
|
||||||
statistic.setShopId(shopId);
|
|
||||||
statistic.setCreateDay(LocalDate.now());
|
|
||||||
}
|
|
||||||
//TODO 充值金额
|
|
||||||
statistic.setRechargeAmount(BigDecimal.ZERO);
|
|
||||||
//TODO 客单价
|
|
||||||
statistic.setCustomerUnitPrice(BigDecimal.ZERO);
|
|
||||||
//TODO 翻台率
|
|
||||||
statistic.setTableTurnoverRate(BigDecimal.ZERO);
|
|
||||||
statistic.setUpdateTime(LocalDateTime.now());
|
|
||||||
BeanUtil.copyProperties(info, statistic);
|
|
||||||
saveOrUpdate(statistic);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
countInfo.forEach((shopId, info) -> {
|
||||||
|
ShopOrderStatistic statistic = getOne(new QueryWrapper().eq(ShopOrderStatistic::getShopId, shopId).eq(ShopOrderStatistic::getCreateDay, yesterday.toSqlDate()));
|
||||||
|
if (statistic == null) {
|
||||||
|
statistic = new ShopOrderStatistic();
|
||||||
|
statistic.setShopId(shopId);
|
||||||
|
statistic.setCreateDay(LocalDate.now());
|
||||||
|
}
|
||||||
|
//TODO 充值金额
|
||||||
|
statistic.setRechargeAmount(BigDecimal.ZERO);
|
||||||
|
//TODO 客单价
|
||||||
|
statistic.setCustomerUnitPrice(BigDecimal.ZERO);
|
||||||
|
//TODO 翻台率
|
||||||
|
statistic.setTableTurnoverRate(BigDecimal.ZERO);
|
||||||
|
statistic.setUpdateTime(LocalDateTime.now());
|
||||||
|
BeanUtil.copyProperties(info, statistic);
|
||||||
|
saveOrUpdate(statistic);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,8 @@ public class ShopProdStatisticServiceImpl extends ServiceImpl<ShopProdStatisticM
|
||||||
statistic.setRefundAmount(statisticTask.getRefundAmount());
|
statistic.setRefundAmount(statisticTask.getRefundAmount());
|
||||||
saveOrUpdate(statistic);
|
saveOrUpdate(statistic);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,4 +113,5 @@ public class ShopTableOrderStatisticServiceImpl extends ServiceImpl<ShopTableOrd
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue