莫名的问题

This commit is contained in:
2025-11-11 15:07:15 +08:00
parent d33e177e29
commit 70b7d38bad
5 changed files with 105 additions and 8 deletions

View File

@@ -61,7 +61,10 @@ public class ShopOrderStatisticServiceImpl extends ServiceImpl<ShopOrderStatisti
) {
log.info("店铺:{}{},没有要存档的订单统计数据", shopId, dateTime.toDateStr());
} else {
ShopOrderStatistic entity = getMapper().selectOneByQuery(query().eq(ShopOrderStatistic::getShopId, shopId).eq(ShopOrderStatistic::getCreateDay, dateTime.toDateStr()));
ShopOrderStatistic entity =
getMapper()
.selectOneByQuery(query().eq("shop_id", shopId)
.eq("create_day", dateTime.toDateStr()));
if (entity != null) {
statistic.setId(entity.getId());
updateById(statistic);

View File

@@ -60,7 +60,10 @@ public class ShopProdStatisticServiceImpl extends ServiceImpl<ShopProdStatisticM
param.setBeginDate(startOfDay.toStringDefaultTimeZone());
param.setEndDate(endOfDay.toStringDefaultTimeZone());
// 删除之前统计数据
getMapper().deleteByQuery(QueryWrapper.create().eq(ShopProdStatistic::getShopId, shopId).eq(ShopProdStatistic::getCreateDay, dateTime.toDateStr()));
getMapper().deleteByQuery(
QueryWrapper.create()
.eq("shop_id", shopId)
.eq("create_day", dateTime.toDateStr()));
// 重新统计数据
List<DataSummaryProductSaleRankingVo> list = shopProdStatisticMapper.findProdRandingSummaryPage2(param);
for (DataSummaryProductSaleRankingVo dto : list) {

View File

@@ -86,7 +86,11 @@ public class ShopTableOrderStatisticServiceImpl extends ServiceImpl<ShopTableOrd
param.setBeginDate(startOfDay.toStringDefaultTimeZone());
param.setEndDate(endOfDay.toStringDefaultTimeZone());
// 删除之前统计数据
getMapper().deleteByQuery(new QueryWrapper().eq(ShopTableOrderStatistic::getShopId, shopId).eq(ShopTableOrderStatistic::getCreateDay, dateTime.toDateStr()));
getMapper()
.deleteByQuery(
new QueryWrapper()
.eq("shop_id", shopId)
.eq("create_day", dateTime.toDateStr()));
// 重新统计数据
List<TableSummaryInfoVo> list = shopTableOrderStatisticMapper.findSummaryList2(param);
for (TableSummaryInfoVo dto : list) {