data_management.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. package v1
  2. import (
  3. "adm-gateway/param/base"
  4. v1 "adm-gateway/pb/v1"
  5. )
  6. // 1. 数据管理表 t_adm_data_management
  7. type GetDataListQuery struct {
  8. TableName string `form:"table_name" json:"table_name"`
  9. Desc string `form:"desc" json:"desc"`
  10. Level string `form:"level" json:"level"`
  11. Page int32 `form:"page" json:"page"`
  12. PageSize int32 `form:"page_size" json:"page_size"`
  13. }
  14. type GetDataListRequest struct {
  15. base.Header
  16. GetDataListQuery
  17. }
  18. type GetDataListResponse struct {
  19. base.Result
  20. Data *v1.DataListReply `json:"dataList"`
  21. }
  22. // 数据搜索列表
  23. type SearchDataQuery struct {
  24. TableName string `json:"table_name" form:"table_name"`
  25. }
  26. type SearchDataRequest struct {
  27. base.Header
  28. SearchDataQuery
  29. }
  30. type SearchDataResponse struct {
  31. base.Result
  32. Data *v1.SearchDataReply `json:"data"`
  33. }
  34. // 所属层搜索列表
  35. type SearchLevelQuery struct {
  36. Level string `json:"level" form:"level"`
  37. }
  38. type SearchLevelRequest struct {
  39. base.Header
  40. SearchLevelQuery
  41. }
  42. type SearchLevelResponse struct {
  43. base.Result
  44. Data []string `json:"data"`
  45. }
  46. // 2.数据关系表 t_adm_task_data_relation
  47. type GetRelationQuery struct {
  48. SourceCode string `form:"source_code" json:"source_code"`
  49. }
  50. type GetRelationRequest struct {
  51. base.Header
  52. GetRelationQuery
  53. }
  54. type GetRelationResponse struct {
  55. base.Result
  56. Data *v1.RelationReply `json:"relationData"`
  57. }
  58. // 任务开关
  59. type GetSwitchBody struct {
  60. TaskId int64 `form:"task_id" json:"task_id"`
  61. IsOn bool `form:"is_on" json:"is_on"`
  62. }
  63. type GetSwitchRequest struct {
  64. base.Header
  65. GetSwitchBody
  66. }
  67. type GetSwitchResponse struct {
  68. base.Result
  69. }
  70. // 3.任务管理表 t_adm_tasks_management
  71. type GetTaskListQuery struct {
  72. TaskName string `form:"task_name" json:"task_name"`
  73. Desc string `form:"desc" json:"desc"`
  74. Page int32 `form:"page" json:"page"`
  75. PageSize int32 `form:"page_size" json:"page_size"`
  76. }
  77. type GetTaskListRequest struct {
  78. base.Header
  79. GetTaskListQuery
  80. }
  81. type GetTaskListResponse struct {
  82. base.Result
  83. Data *v1.TaskListReply `json:"taskList"`
  84. }
  85. // 任务搜索列表
  86. type SearchTaskQuery struct {
  87. TaskName string `json:"task_name" form:"task_name"`
  88. }
  89. type SearchTaskRequest struct {
  90. base.Header
  91. SearchTaskQuery
  92. }
  93. type SearchTaskResponse struct {
  94. base.Result
  95. Data *v1.SearchTaskReply `json:"data"`
  96. }
  97. // 4.依赖表 t_adm_task_dependency
  98. type GetDependencyQuery struct {
  99. TaskId int64 `form:"task_id" json:"task_id"`
  100. Type int32 `form:"type" json:"type"`
  101. }
  102. type GetDependencyRequest struct {
  103. base.Header
  104. GetDependencyQuery
  105. }
  106. type GetDependencyResponse struct {
  107. base.Result
  108. Data *v1.DependencyReply `json:"dependencyData"`
  109. }
  110. // DataSourceRelation
  111. type GetDataSourceRelationQuery struct {
  112. SourceCode string `form:"source_code" json:"source_code"`
  113. TaskId int64 `form:"task_id" json:"task_id"`
  114. }
  115. type GetDataSourceRelationRequest struct {
  116. base.Header
  117. GetDataSourceRelationQuery
  118. }
  119. type GetDataSourceRelationResponse struct {
  120. base.Result
  121. Data *v1.DataSourceRelationReply `json:"data"`
  122. }
  123. // 手动任务列表 t_adm_offline_task
  124. type GetManualTaskQuery struct {
  125. Source string `form:"source" json:"source"`
  126. TaskName string `form:"task_name" json:"task_name"`
  127. ManualTaskName string `form:"manual_task_name" json:"manual_task_name"`
  128. Time1 int64 `form:"time1" json:"time1"`
  129. Time2 int64 `form:"time2" json:"time2"`
  130. Page int32 `form:"page" json:"page"`
  131. PageSize int32 `form:"page_size" json:"page_size"`
  132. }
  133. type GetManualTaskRequest struct {
  134. base.Header
  135. GetManualTaskQuery
  136. }
  137. type GetManualTaskResponse struct {
  138. base.Result
  139. Data *v1.ManualTaskReply `json:"manualTaskData"`
  140. }
  141. // 源表搜索列表
  142. type SourceQuery struct {
  143. SourceName string `json:"source_name" form:"source_name"`
  144. }
  145. type SourceRequest struct {
  146. base.Header
  147. SourceQuery
  148. }
  149. type SourceResponse struct {
  150. base.Result
  151. Data *v1.SourceReply `json:"data"`
  152. }
  153. // 任务列表
  154. type TaskQuery struct {
  155. SourceRequest string `json:"source_request" form:"source_request"`
  156. }
  157. type TaskRequest struct {
  158. base.Header
  159. TaskQuery
  160. }
  161. type TaskResponse struct {
  162. base.Result
  163. Data *v1.TaskReply `json:"data"`
  164. }
  165. // 创建手动任务
  166. type CreateBody struct {
  167. TaskName string `form:"task_name" json:"task_name"`
  168. Type int64 `form:"type" json:"type"`
  169. Source string `form:"source" json:"source"`
  170. Sql string `form:"sql" json:"sql"`
  171. TaskIds []string `form:"task_ids" json:"task_ids"`
  172. }
  173. type CreateRequest struct {
  174. base.Header
  175. CreateBody
  176. }
  177. type CreateResponse struct {
  178. base.Result
  179. }
  180. // 上传
  181. type UploadFileBody struct {
  182. TaskName string `form:"task_name" json:"task_name"`
  183. }
  184. type UploadFileRequest struct {
  185. base.Header
  186. UploadFileBody
  187. }
  188. type UploadFileResponse struct {
  189. base.Result
  190. Data *v1.UploadFileReply `json:"data"`
  191. }
  192. // 字段管理表 t_adm_field_management
  193. type GetFieldListQuery struct {
  194. Field string `form:"field" json:"field"`
  195. Desc string `form:"desc" json:"desc"`
  196. Page int32 `form:"page" json:"page"`
  197. PageSize int32 `form:"page_size" json:"page_size"`
  198. }
  199. type GetFieldListRequest struct {
  200. base.Header
  201. GetFieldListQuery
  202. }
  203. type GetFieldListResponse struct {
  204. base.Result
  205. Data *v1.FieldReply `json:"data"`
  206. }
  207. // 导出EXCEL
  208. type ExcelQuery struct {
  209. }
  210. type ExcelRequest struct {
  211. base.Header
  212. ExcelQuery
  213. }
  214. type ExcelResponse struct {
  215. base.Result
  216. Data *v1.ExcelReply `json:"data"`
  217. }
  218. // API管理表 t_adm_api_management
  219. type GetAPIListQuery struct {
  220. ApiNo string `form:"api_no" json:"api_no"`
  221. Desc string `form:"desc" json:"desc"`
  222. Page int32 `form:"page" json:"page"`
  223. PageSize int32 `form:"page_size" json:"page_size"`
  224. }
  225. type GetAPIListRequest struct {
  226. base.Header
  227. GetAPIListQuery
  228. }
  229. type GetAPIListResponse struct {
  230. base.Result
  231. Data *v1.APIListReply `json:"data"`
  232. }
  233. // 查看API
  234. type GetCheckAPIQuery struct {
  235. ApiId int64 `form:"api_id" json:"api_id"`
  236. }
  237. type GetCheckAPIRequest struct {
  238. base.Header
  239. GetCheckAPIQuery
  240. }
  241. type GetCheckAPIResponse struct {
  242. base.Result
  243. Data *v1.CheckAPIReply `json:"data"`
  244. }
  245. // 删除API
  246. type GetDeleteAPIPath struct {
  247. ApiId int64 `uri:"api_id" json:"api_id"`
  248. }
  249. type GetDeleteAPIRequest struct {
  250. base.Header
  251. GetDeleteAPIPath
  252. }
  253. type GetDeleteAPIResponse struct {
  254. base.Result
  255. }
  256. // 密钥管理表 t_adm_api_management
  257. type GetKeyListQuery struct {
  258. Key string `form:"key" json:"key"`
  259. Desc string `form:"desc" json:"desc"`
  260. Page int32 `form:"page" json:"page"`
  261. PageSize int32 `form:"page_size" json:"page_size"`
  262. }
  263. type GetKeyListRequest struct {
  264. base.Header
  265. GetKeyListQuery
  266. }
  267. type GetKeyListResponse struct {
  268. base.Result
  269. Data *v1.KeyListReply `json:"data"`
  270. }
  271. // 新增密钥
  272. type CreateKeyBody struct {
  273. Desc string `form:"desc" json:"desc"`
  274. }
  275. type CreateKeyRequest struct {
  276. base.Header
  277. CreateKeyBody
  278. }
  279. type CreateKeyResponse struct {
  280. base.Result
  281. }
  282. // 删除密钥
  283. type DeleteKeyPath struct {
  284. Key string `uri:"key" json:"key"`
  285. }
  286. type DeleteKeyRequest struct {
  287. base.Header
  288. DeleteKeyPath
  289. }
  290. type DeleteKeyResponse struct {
  291. base.Result
  292. }
  293. // API列表
  294. type AllAPIQuery struct {
  295. AllAPI string `json:"all_api" form:"all_api"`
  296. }
  297. type AllAPIRequest struct {
  298. base.Header
  299. AllAPIQuery
  300. }
  301. type AllAPIResponse struct {
  302. base.Result
  303. Data *v1.AllAPIReply `json:"data"`
  304. }
  305. // 密钥列表
  306. type AllKeyQuery struct {
  307. AllKey string `json:"all_key" form:"all_key"`
  308. }
  309. type AllKeyRequest struct {
  310. base.Header
  311. AllKeyQuery
  312. }
  313. type AllKeyResponse struct {
  314. base.Result
  315. Data []string `json:"data"`
  316. }
  317. // API查询
  318. type UseAPIQuery struct {
  319. ApiId int64 `form:"api_id" json:"api_id"`
  320. }
  321. type UseAPIRequest struct {
  322. base.Header
  323. UseAPIQuery
  324. }
  325. type UseAPIResponse struct {
  326. base.Result
  327. Data *v1.UseAPIReply `json:"data"`
  328. }
  329. // 查看表结构
  330. type TableStructQuery struct {
  331. TableName string `json:"table_name" form:"table_name"`
  332. }
  333. type TableStructRequest struct {
  334. base.Header
  335. TableStructQuery
  336. }
  337. type TableStructResponse struct {
  338. base.Result
  339. Data *v1.TableStructReply `json:"data"`
  340. }
  341. // 车型映射管理
  342. type StyleMapQuery struct {
  343. Source string `form:"source" json:"source"`
  344. State int64 `form:"state" json:"state"`
  345. ThirdStyleId string `form:"third_style_id" json:"third_style_id"`
  346. StyleId string `form:"style_id" json:"style_id"`
  347. Page int32 `form:"page" json:"page"`
  348. PageSize int32 `form:"page_size" json:"page_size"`
  349. }
  350. type StyleMapRequest struct {
  351. base.Header
  352. StyleMapQuery
  353. }
  354. type StyleMapResponse struct {
  355. base.Result
  356. Data *v1.StyleMapReply `json:"data"`
  357. }
  358. // 编辑
  359. type EditMapBody struct {
  360. ThirdStyleId string `form:"third_style_id" json:"third_style_id"`
  361. StyleId string `form:"style_id" json:"style_id"`
  362. }
  363. type EditMapRequest struct {
  364. base.Header
  365. EditMapBody
  366. }
  367. type EditMapResponse struct {
  368. base.Result
  369. Data *v1.EditMapReply `json:"data"`
  370. }
  371. // 映射源列表
  372. type AllSourceQuery struct {
  373. AllSource string `json:"all_source" form:"all_source"`
  374. }
  375. type AllSourceRequest struct {
  376. base.Header
  377. AllSourceQuery
  378. }
  379. type AllSourceResponse struct {
  380. base.Result
  381. Data []string `json:"data"`
  382. }
  383. // 信息公告
  384. type GetAnnouncementQuery struct {
  385. VinRule string `json:"vin_rule" form:"vin_rule"`
  386. BrandName string `json:"brand_name" form:"brand_name"`
  387. ModelNo string `json:"model_no" form:"model_no"`
  388. Page int32 `form:"page" json:"page"`
  389. PageSize int32 `form:"page_size" json:"page_size"`
  390. }
  391. type GetAnnouncementRequest struct {
  392. base.Header
  393. GetAnnouncementQuery
  394. }
  395. type GetAnnouncementResponse struct {
  396. base.Result
  397. Data *v1.AnnouncementReply `json:"data"`
  398. }
  399. // 编辑
  400. type GetEditQuery struct {
  401. VehicleBatch string `json:"vehicle_batch" form:"vehicle_batch"`
  402. ModelNo string `json:"model_no" form:"model_no"`
  403. }
  404. type GetEditRequest struct {
  405. base.Header
  406. GetEditQuery
  407. }
  408. type GetEditResponse struct {
  409. base.Result
  410. Data *v1.EditReply `json:"data"`
  411. }
  412. // 数据导入模板
  413. type DataImportTemplateQuery struct {
  414. TemplateName string `form:"template_name" json:"template_name"`
  415. Page int32 `form:"page" json:"page"`
  416. PageSize int32 `form:"page_size" json:"page_size"`
  417. }
  418. type DataImportTemplateRequest struct {
  419. base.Header
  420. DataImportTemplateQuery
  421. }
  422. type DataImportTemplateResponse struct {
  423. base.Result
  424. Data *v1.DataImportTemplateReply `json:"data"`
  425. }
  426. // 新建模板
  427. type CreateTemplateBody struct {
  428. TemplateName string `form:"template_name" json:"template_name"`
  429. Request []string `form:"request" json:"request"`
  430. TaskName []string `form:"task_name" json:"task_name"`
  431. }
  432. type CreateTemplateRequest struct {
  433. base.Header
  434. CreateTemplateBody
  435. }
  436. type CreateTemplateResponse struct {
  437. base.Result
  438. }
  439. // 修改模板
  440. type EditTemplateBody struct {
  441. Id int64 `form:"id" json:"id"`
  442. TemplateName string `form:"template_name" json:"template_name"`
  443. Request []string `form:"request" json:"request"`
  444. TaskName []string `form:"task_name" json:"task_name"`
  445. }
  446. type EditTemplateRequest struct {
  447. base.Header
  448. EditTemplateBody
  449. }
  450. type EditTemplateResponse struct {
  451. base.Result
  452. }
  453. // 删除模板
  454. type DeleteTemplatePath struct {
  455. Id int64 `uri:"id" json:"id"`
  456. }
  457. type DeleteTemplateRequest struct {
  458. base.Header
  459. DeleteTemplatePath
  460. }
  461. type DeleteTemplateResponse struct {
  462. base.Result
  463. }
  464. // 数据导入
  465. //type DataImport struct {
  466. // Request string `form:"request" json:"request"`
  467. // Value string `form:"value" json:"value"`
  468. //}
  469. type DataImportBody struct {
  470. Id int64 `form:"id" json:"id"`
  471. RequestList []*v1.DataImport `form:"request_list" json:"request_list"`
  472. }
  473. type DataImportRequest struct {
  474. base.Header
  475. DataImportBody
  476. }
  477. type DataImportResponse struct {
  478. base.Result
  479. }
  480. // 更新API信息
  481. type UpdateAPIBody struct {
  482. Api string `form:"api" json:"api"`
  483. Param string `form:"param" json:"param"`
  484. Data string `form:"data" json:"data"`
  485. }
  486. type UpdateAPIRequest struct {
  487. base.Header
  488. UpdateAPIBody
  489. }
  490. type UpdateAPIResponse struct {
  491. base.Result
  492. }