Files
contract-manager/server/src/main/java/com/ecep/contract/QueryService.java
songqq 1f354853b0 refactor(service): 调整接口泛型参数并优化缓存策略
docs(task): 更新接口泛型修改相关文档

- 重构QueryService接口,移除未使用的Specification相关方法
- InventoryCatalogService实现IEntityService和QueryService接口
- 新增delete方法实现并调整缓存配置
- 删除过时的任务文档并重新组织文档结构
- 更新ALIGNMENT、CONSENSUS等文档,添加WebSocket服务兼容性说明
2025-09-28 19:11:53 +08:00

29 lines
925 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.ecep.contract;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.fasterxml.jackson.databind.JsonNode;
/**
* 查询服务接口,提供通用的分页查询能力
* 泛型T表示查询结果的数据类型
*/
public interface QueryService<T> {
/**
* 根据查询参数和分页条件获取数据列表
*
* @param paramsNode JSON格式的查询参数节点包含各种过滤条件
* @param pageable 分页参数,包含页码、每页条数、排序规则等信息
* @return 分页查询结果,包含符合条件的数据列表和分页元数据
*/
Page<T> findAll(JsonNode paramsNode, Pageable pageable);
// Specification<T> getSpecification(String searchText);
// Page<T> findAll(Specification<T> spec, Pageable pageable);
default long count(JsonNode paramsNode) {
return 0;
}
}