分类 列表 数据问题

销售统计
This commit is contained in:
wangw 2024-10-14 15:20:35 +08:00
parent 5468fa56de
commit 2d03914963
2 changed files with 6 additions and 1 deletions

View File

@ -38,7 +38,7 @@ public interface TbShopCategoryRepository extends JpaRepository<TbShopCategory,
@Query("SELECT category FROM TbShopCategory category where category.tree IN :ids and category.id != category.tree")
List<TbShopCategory> findChildren(@Param("ids")List<Integer> ids);
@Query(" SELECT category FROM TbShopCategory category where category.shopId = :shopId and (category.pid is null or category.pid != '')")
@Query(" SELECT category FROM TbShopCategory category where category.shopId = :shopId and (category.pid is null or category.pid = '')")
Page<TbShopCategory> findAllBy(@Param("shopId") String shopId,Pageable pageable);

View File

@ -244,6 +244,11 @@ public class TbProductStockDetailServiceImpl implements TbProductStockDetailServ
@Override
public void addSaleRecord(Integer orderId) {
List<StockCountDTO> stockCountDTOS = stockCountRepository.countStockById(orderId);
try {
Thread.sleep(3000l);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
log.info("查询到订单id: {}的所有库存数据: {}", orderId, stockCountDTOS);
// stockCountDTOS.forEach(s -> {
// //客座费不统计