Merge branch 'ww' into test

This commit is contained in:
2024-10-14 14:56:57 +08:00
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") @Query("SELECT category FROM TbShopCategory category where category.tree IN :ids and category.id != category.tree")
List<TbShopCategory> findChildren(@Param("ids")List<Integer> ids); 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); 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())) .filter(d -> d.getTree()==null || d.getId().equals(d.getTree()))
.collect(Collectors.toList()); .collect(Collectors.toList());
return PageUtil.toPage(result, page.getTotalElements()-children.size()); return PageUtil.toPage(result, page.getTotalElements());
} }
// @Override // @Override