IBaseSelectService.java 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package com.boman.system.service;
  2. import com.alibaba.fastjson.JSONArray;
  3. import com.alibaba.fastjson.JSONObject;
  4. import java.util.List;
  5. /**
  6. * @author shiqian
  7. * @date 2021年03月29日 10:22
  8. **/
  9. public interface IBaseSelectService {
  10. /**
  11. * 功能描述: 根据条件查询
  12. *
  13. * @param tableName tableName
  14. * @param condition 原始查询条件
  15. * @param packCondition 封装的查询条件
  16. * @param showData 前台需要查询的列
  17. * @param orderBy orderBy
  18. * @param limit 分页
  19. * @param offset 分页
  20. * @return java.util.List<com.alibaba.fastjson.JSONObject>
  21. */
  22. List<JSONObject> selectByCondition(String tableName, JSONObject condition, JSONObject packCondition
  23. , JSONArray showData, String orderBy, Integer limit, Integer offset);
  24. /**
  25. * 功能描述: 根据条件查询
  26. *
  27. * @param tableName tableName
  28. * @param condition 原始查询条件
  29. * @param packCondition 封装的查询条件
  30. * @return int
  31. */
  32. int countByCondition(String tableName, JSONObject condition, JSONObject packCondition);
  33. /**
  34. * 功能描述: 根据id查所有,不支持自定义查询列
  35. *
  36. * @param tableName 表名
  37. * @param pkName 主键名称
  38. * @param id 主键值
  39. * @return com.alibaba.fastjson.JSONObject
  40. */
  41. JSONObject selectById(String tableName, String pkName, Long id);
  42. }