提交 38fd7b5f authored 作者: Whispa's avatar Whispa

commit commit

上级 7c406d9a
......@@ -56,7 +56,7 @@ public class ItemController {
@RequestParam(value = "pageSize", defaultValue = "6") Integer pageSize,
@RequestParam(value = "order", required = false) String order) {
return new Result<>(repository.findAllByItemCategorytwoOrderByCreateTimeDesc(typeTwoId, PageRequest.of(pageNum,pageSize,getSort(order))));
return new Result<>(repository.findAllByItemCategorytwo(typeTwoId, PageRequest.of(pageNum,pageSize,getSort(order))));
}
@GetMapping("/queryCategoryTwoByCid/{categoryId}")
......@@ -134,7 +134,7 @@ public class ItemController {
@RequestParam(value = "pageNum", defaultValue = "0") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "6") Integer pageSize,
@RequestParam(value = "order", required = false) String order) {
return new Result<>(repository.findAllByItemDescritionIdOrderByCreateTimeDesc(typeThreeId, PageRequest.of(pageNum,pageSize,getSort(order))));
return new Result<>(repository.findAllByItemDescritionId(typeThreeId, PageRequest.of(pageNum,pageSize,getSort(order))));
}
private Sort getSort(String order){
......
......@@ -12,9 +12,9 @@ import org.springframework.data.repository.query.Param;
import java.util.List;
public interface TbCfStationItemRepository extends PagingAndSortingRepository<TbCfStationItem, String> {
Page<TbCfStationItem> findAllByItemCategorytwoOrderByCreateTimeDesc(String category, Pageable pageable);
Page<TbCfStationItem> findAllByItemCategorytwo(String category, Pageable pageable);
Page<TbCfStationItem> findAllByItemDescritionIdOrderByCreateTimeDesc(String description, Pageable pageable);
Page<TbCfStationItem> findAllByItemDescritionId(String description, Pageable pageable);
Page<TbCfStationItem> findAllByItemLabelContaining(String label, Pageable pageable);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论