分类 列表 数据问题

This commit is contained in:
wangw 2024-10-14 14:55:09 +08:00
parent cab483a7b9
commit 5468fa56de
2 changed files with 2 additions and 2 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")
@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

@ -91,7 +91,7 @@ public class TbShopCategoryServiceImpl implements TbShopCategoryService {
.filter(d -> d.getTree()==null || d.getId().equals(d.getTree()))
.collect(Collectors.toList());
return PageUtil.toPage(result, page.getTotalElements()-children.size());
return PageUtil.toPage(result, page.getTotalElements());
}
// @Override