IDataPublisherService.java 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. package com.primeton.dsp.dataservice.service;
  2. import com.primeton.dsp.dataservice.vomodel.PubServiceVO;
  3. import com.primeton.dsp.dataservice.vomodel.ServiceParamVO;
  4. import feign.Headers;
  5. import feign.Param;
  6. import feign.RequestLine;
  7. import java.util.Map;
  8. /**
  9. *
  10. * 服务发布调用 datarelease 接口
  11. *
  12. *
  13. * <pre>
  14. *
  15. * Created by zhaopx.
  16. * User: zhaopx
  17. * Date: 2020/3/30
  18. * Time: 17:08
  19. *
  20. * </pre>
  21. *
  22. * @author zhaopx
  23. */
  24. public interface IDataPublisherService {
  25. /**
  26. * 生成 SQL。 应包含 sid,table, conds 几个参数
  27. *
  28. * @return
  29. */
  30. @RequestLine("POST /api/pub/saveSingleQuery")
  31. @Headers({"Content-Type: application/json", "Accept: application/json"})
  32. Map<String, Object> saveSingleQuery(Map<String, Object> singleQuery);
  33. /**
  34. * 多表发布服务生成 SQL。 应包含 sid,tables,joins, conds 几个参数
  35. *
  36. * @return
  37. */
  38. @RequestLine("POST /api/pub/saveMutilTableQuery")
  39. @Headers({"Content-Type: application/json", "Accept: application/json"})
  40. Map<String, Object> saveMutilTableQuery(Map<String, Object> mutil);
  41. /**
  42. * 发布服务, 单表和多表
  43. *
  44. * @param model
  45. * @return 返回发布结果, success 为 true 则发布成功
  46. */
  47. @RequestLine("POST /api/pub/doPub")
  48. @Headers({"Content-Type: application/json", "Accept: application/json"})
  49. public Map<String, Object> doPubService(PubServiceVO model);
  50. /**
  51. * 删除 已经发布的服务
  52. *
  53. * @param id 服务 ID
  54. * @return success 为 true 则删除服务成功
  55. */
  56. @RequestLine("POST /api/pub/remove?id={id}")
  57. Map<String, Object> removeDataPub(@Param("id") String id);
  58. /**
  59. * 修改服务参数
  60. * @param model
  61. * @return
  62. */
  63. @RequestLine("POST /api/pub/saveServiceParams")
  64. @Headers({"Content-Type: application/json", "Accept: application/json"})
  65. Map<String, Object> saveServiceParams(ServiceParamVO model);
  66. /**
  67. * 获取任务的正在运行的
  68. *
  69. * @param jobId
  70. * @return
  71. */
  72. @RequestLine("GET /getExecutingJobs?jobId={jobId}")
  73. Map<String, Object> getExecutingJobs(@Param("jobId") String jobId);
  74. /**
  75. * 分页获取规则
  76. *
  77. * @param page
  78. * @param pageSize
  79. * @return
  80. */
  81. @RequestLine(value = "GET /rule/getAllRules?page={page}&pageSize={pageSize}")
  82. Map<String, Object> getAllRules(@Param(value = "page") int page,
  83. @Param(value = "pageSize") int pageSize);
  84. /**
  85. * 上传文件,管理平台上传直接到 任务调度
  86. *
  87. * @param jobId 任务 ID
  88. * @param file 上传文件
  89. * @return 返回上传结果
  90. */
  91. @RequestLine("POST /upload/file")
  92. Map<String, Object> uploadFile(@Param(value = "jobId") String jobId,
  93. @Param("file") MultipartFile file);
  94. }