GenTableService.java 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright (c) 2021-2025, LXQ All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are met:
  6. *
  7. * Redistributions of source code must retain the above copyright notice,
  8. * this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * Neither the name of the com developer nor the names of its
  13. * contributors may be used to endorse or promote products derived from
  14. * this software without specific prior written permission.
  15. * Author: LXQ (609827073@qq.com)
  16. */
  17. package com.kxs.codegen.biz.service;
  18. import com.baomidou.mybatisplus.core.metadata.IPage;
  19. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  20. import com.baomidou.mybatisplus.extension.service.IService;
  21. import com.kxs.codegen.biz.entity.GenTable;
  22. import java.util.List;
  23. import java.util.Map;
  24. /**
  25. * 列属性
  26. *
  27. * @author skyx code generator
  28. * @date 2023-02-06 20:34:55
  29. */
  30. public interface GenTableService extends IService<GenTable> {
  31. /**
  32. * 获取默认配置信息
  33. * @return 默认配置信息
  34. */
  35. Map<String, Object> getGeneratorConfig();
  36. /**
  37. * 分页查询表格列表
  38. * @param page 分页对象
  39. * @param table 查询条件
  40. * @return 表格列表分页结果
  41. */
  42. IPage list(Page<GenTable> page, GenTable table);
  43. /**
  44. * 根据数据源名称和表名查询或构建表格
  45. * @param dsName 数据源名称
  46. * @param tableName 表名
  47. * @return 查询到的表格信息
  48. */
  49. GenTable queryOrBuildTable(String dsName, String tableName);
  50. /**
  51. * 查询指定数据源下的所有表格
  52. * @param dsName 数据源名称
  53. * @return 所有表格的列表
  54. */
  55. List<Map<String, Object>> queryDsAllTable(String dsName);
  56. /**
  57. * 查询指定数据源和表名的列信息
  58. * @param dsName 数据源名称
  59. * @param tableName 表名
  60. * @return 列信息列表
  61. */
  62. List<Map<String, String>> queryColumn(String dsName, String tableName);
  63. }