router.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. // @APIVersion 1.0.0
  2. // @Title beego Test API
  3. // @Description beego has a very cool tools to autogenerate documents for your API
  4. // @Contact astaxie@gmail.com
  5. // @TermsOfServiceUrl http://web.me/
  6. // @License Apache 2.0
  7. // @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
  8. package routers
  9. import (
  10. "eta/eta_api/controllers"
  11. "eta/eta_api/controllers/ai"
  12. "eta/eta_api/controllers/data_manage"
  13. "eta/eta_api/controllers/data_manage/ai_predict_model"
  14. "eta/eta_api/controllers/data_manage/correlation"
  15. "eta/eta_api/controllers/data_manage/cross_variety"
  16. "eta/eta_api/controllers/data_manage/data_manage_permission"
  17. "eta/eta_api/controllers/data_manage/excel"
  18. future_good2 "eta/eta_api/controllers/data_manage/future_good"
  19. "eta/eta_api/controllers/data_manage/line_equation"
  20. "eta/eta_api/controllers/data_manage/line_feature"
  21. "eta/eta_api/controllers/data_manage/range_analysis"
  22. "eta/eta_api/controllers/data_manage/stl"
  23. "eta/eta_api/controllers/data_manage/supply_analysis"
  24. "eta/eta_api/controllers/data_source"
  25. "eta/eta_api/controllers/data_stat"
  26. "eta/eta_api/controllers/document_manage"
  27. "eta/eta_api/controllers/edb_monitor"
  28. "eta/eta_api/controllers/english_report"
  29. "eta/eta_api/controllers/eta_forum"
  30. "eta/eta_api/controllers/eta_trial"
  31. "eta/eta_api/controllers/fe_calendar"
  32. "eta/eta_api/controllers/material"
  33. "eta/eta_api/controllers/report_approve"
  34. "eta/eta_api/controllers/residual_analysis"
  35. "eta/eta_api/controllers/roadshow"
  36. "eta/eta_api/controllers/sandbox"
  37. "eta/eta_api/controllers/semantic_analysis"
  38. "eta/eta_api/controllers/smart_report"
  39. "eta/eta_api/controllers/speech_recognition"
  40. "eta/eta_api/controllers/trade_analysis"
  41. "eta/eta_api/services"
  42. "github.com/beego/beego/v2/server/web"
  43. "github.com/beego/beego/v2/server/web/filter/cors"
  44. )
  45. func init() {
  46. //解决跨域问题
  47. web.InsertFilter("*", web.BeforeRouter, cors.Allow(&cors.Options{
  48. AllowAllOrigins: true,
  49. AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
  50. AllowHeaders: []string{"Origin", "Authorization", "Uuid", "Accesstoken", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
  51. ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
  52. AllowCredentials: true,
  53. }))
  54. web.InsertFilter("/adminapi/share/*", web.BeforeRouter, services.FilterShareUrl())
  55. ns := web.NewNamespace("/adminapi",
  56. web.NSNamespace("/sysuser",
  57. web.NSInclude(
  58. &controllers.SysUserController{},
  59. ),
  60. web.NSInclude(
  61. &controllers.SysUserAuthController{},
  62. ),
  63. ),
  64. web.NSNamespace("/classify",
  65. web.NSInclude(
  66. &controllers.ClassifyController{},
  67. ),
  68. ),
  69. web.NSNamespace("/banner",
  70. web.NSInclude(
  71. &controllers.BannerController{},
  72. ),
  73. ),
  74. web.NSNamespace("/report",
  75. web.NSInclude(
  76. &controllers.ReportController{},
  77. &controllers.ReportChapterTypeController{},
  78. ),
  79. web.NSInclude(
  80. &controllers.ReportCommonController{},
  81. ),
  82. web.NSInclude(
  83. &controllers.ReportUploadCommonController{},
  84. ),
  85. ),
  86. web.NSNamespace("/voice",
  87. web.NSInclude(
  88. &controllers.VoiceController{},
  89. ),
  90. web.NSInclude(
  91. &controllers.VoiceCommonController{},
  92. ),
  93. ),
  94. web.NSNamespace("/pptv2",
  95. web.NSInclude(
  96. &controllers.PptV2Controller{},
  97. &controllers.PptV2GroupController{},
  98. ),
  99. web.NSInclude(
  100. &controllers.PptV2CommonController{},
  101. ),
  102. ),
  103. web.NSNamespace("/ppt_english",
  104. web.NSInclude(
  105. &controllers.PptEnglishController{},
  106. &controllers.PptEnglishGroupController{},
  107. ),
  108. web.NSInclude(
  109. &controllers.PptEnglishCommonController{},
  110. ),
  111. ),
  112. web.NSNamespace("/entry",
  113. web.NSInclude(
  114. &controllers.TargetController{},
  115. &data_manage.ManualEdbController{},
  116. ),
  117. web.NSInclude(
  118. &controllers.TargetCommonController{},
  119. ),
  120. web.NSInclude(
  121. &controllers.TradeCommonController{},
  122. ),
  123. ),
  124. web.NSNamespace("/system",
  125. web.NSInclude(
  126. &controllers.SysDepartmentController{},
  127. ),
  128. web.NSInclude(
  129. &controllers.SysGroupController{},
  130. ),
  131. web.NSInclude(
  132. &controllers.SysTeamController{},
  133. ),
  134. web.NSInclude(
  135. &controllers.SysAdminController{},
  136. ),
  137. web.NSInclude(
  138. &controllers.SysRoleController{},
  139. &controllers.SysRoleAdminController{},
  140. ),
  141. web.NSInclude(
  142. &controllers.SysMenuController{},
  143. ),
  144. web.NSInclude(
  145. &controllers.SysMenuButtonController{},
  146. ),
  147. web.NSInclude(
  148. &controllers.ResearchGroupController{},
  149. ),
  150. ),
  151. web.NSNamespace("/custom",
  152. web.NSInclude(
  153. &controllers.CompanySellerController{},
  154. &controllers.CompanyPermissionController{},
  155. ),
  156. ),
  157. web.NSNamespace("/resource",
  158. web.NSInclude(
  159. &controllers.ResourceController{},
  160. &controllers.ResourceAuthController{},
  161. ),
  162. ),
  163. web.NSNamespace("/datamanage",
  164. web.NSInclude(
  165. &data_manage.EdbInfoController{},
  166. &data_manage.EdbClassifyController{},
  167. &data_manage.ChartClassifyController{},
  168. &data_manage.ChartInfoController{},
  169. &data_manage.ManualController{},
  170. &data_manage.BaseFromChangesVisitorsCovidController{},
  171. &excel.ExcelClassifyController{},
  172. &excel.ExcelInfoController{},
  173. &data_manage.PredictEdbClassifyController{},
  174. &data_manage.PredictEdbInfoController{},
  175. &data_manage.BaseFromNationalStatisticsController{},
  176. &data_manage.JiaYueEdbSourceController{},
  177. &data_manage.ChartThemeController{},
  178. &data_manage_permission.DataMangePermissionController{},
  179. &data_manage.BloombergDataController{},
  180. &data_manage.EdbBusinessController{},
  181. &data_manage.EdbInfoRelationController{},
  182. &data_manage.FactorEdbSeriesController{},
  183. &data_manage.SciHqDataController{},
  184. &data_manage.BaseFromThsHfController{},
  185. &data_manage.BaseFromLyClassifyController{},
  186. &data_manage.BaseFromLyIndexController{},
  187. &data_manage.BaseFromUsdaFasController{},
  188. &data_manage.BaseFromRzdIndexController{},
  189. &data_manage.ClarksonsDataController{},
  190. &data_manage.BaseFromGprRiskController{},
  191. ),
  192. ),
  193. web.NSNamespace("/my_chart",
  194. web.NSInclude(
  195. &data_manage.MyChartController{},
  196. ),
  197. ),
  198. web.NSNamespace("/roadshow",
  199. web.NSInclude(
  200. &roadshow.CalendarController{},
  201. ),
  202. ),
  203. web.NSNamespace("/taglib",
  204. web.NSInclude(
  205. &controllers.VarietyTagController{},
  206. ),
  207. ),
  208. web.NSNamespace("/sandbox",
  209. web.NSInclude(
  210. &sandbox.SandboxController{},
  211. ),
  212. ),
  213. web.NSNamespace("/pdfToImg",
  214. web.NSInclude(
  215. &controllers.PdfToImgCommonController{},
  216. ),
  217. ),
  218. web.NSNamespace("/english_report",
  219. web.NSInclude(
  220. &english_report.EnglishReportController{},
  221. &english_report.EnglishPolicyReportController{},
  222. &english_report.EnglishReportEmailController{},
  223. &english_report.EnglishCompanyController{},
  224. &english_report.EnglishCompanyTodoController{},
  225. &english_report.EnglishAuthController{},
  226. &english_report.EnglishReportEmailCallBackController{},
  227. &english_report.EnglishVideoController{},
  228. ),
  229. ),
  230. web.NSNamespace("/report_author",
  231. web.NSInclude(
  232. &controllers.ReportAuthorCommonController{},
  233. ),
  234. web.NSInclude(
  235. &controllers.ReportAuthorController{},
  236. ),
  237. ),
  238. web.NSNamespace("/future_good",
  239. web.NSInclude(
  240. &future_good2.FutureGoodEdbInfoController{},
  241. &future_good2.FutureGoodChartClassifyController{},
  242. &future_good2.FutureGoodChartInfoController{},
  243. ),
  244. ),
  245. web.NSNamespace("/correlation",
  246. web.NSInclude(
  247. &correlation.CorrelationChartClassifyController{},
  248. &correlation.CorrelationChartInfoController{},
  249. ),
  250. ),
  251. web.NSNamespace("/line_equation",
  252. web.NSInclude(
  253. &line_equation.LineEquationChartClassifyController{},
  254. &line_equation.LineEquationChartInfoController{},
  255. ),
  256. ),
  257. web.NSNamespace("/line_feature",
  258. web.NSInclude(
  259. &line_feature.LineFeaturesChartClassifyController{},
  260. &line_feature.LineFeaturesChartInfoController{},
  261. ),
  262. ),
  263. web.NSNamespace("/cloud_disk",
  264. web.NSInclude(
  265. &controllers.CloudDiskController{},
  266. ),
  267. ),
  268. web.NSNamespace("/semantic_analysis",
  269. web.NSInclude(
  270. &semantic_analysis.SaLabelController{},
  271. &semantic_analysis.SaDocClassifyController{},
  272. &semantic_analysis.SaDocController{},
  273. &semantic_analysis.SaCompareClassifyController{},
  274. &semantic_analysis.SaCompareController{},
  275. ),
  276. ),
  277. web.NSNamespace("/supply_analysis",
  278. web.NSInclude(
  279. &supply_analysis.VarietyController{},
  280. ),
  281. ),
  282. web.NSNamespace("/en_permission",
  283. web.NSInclude(
  284. &english_report.EnPermissionController{},
  285. ),
  286. ),
  287. web.NSNamespace("/english_classify",
  288. web.NSInclude(
  289. &english_report.EnglishClassifyController{},
  290. ),
  291. ),
  292. web.NSNamespace("/business_conf",
  293. web.NSInclude(
  294. &controllers.BusinessConfController{},
  295. &controllers.BusinessConfOpenController{},
  296. ),
  297. ),
  298. web.NSNamespace("/trade_analysis",
  299. web.NSInclude(
  300. &trade_analysis.TradeAnalysisController{},
  301. &trade_analysis.WarehouseClassifyController{},
  302. &trade_analysis.WarehouseController{},
  303. &trade_analysis.TradeAnalysisTableController{},
  304. &trade_analysis.TradeAnalysisCorrelationController{},
  305. ),
  306. ),
  307. web.NSNamespace("/custom_analysis",
  308. web.NSInclude(
  309. &excel.CustomAnalysisController{},
  310. ),
  311. ),
  312. web.NSNamespace("/out_link",
  313. web.NSInclude(
  314. &controllers.OutLinkController{},
  315. ),
  316. ),
  317. web.NSNamespace("/user_login",
  318. web.NSInclude(
  319. &controllers.UserLoginController{},
  320. &controllers.UserLoginAuthController{},
  321. ),
  322. ),
  323. web.NSNamespace("/eta_trial",
  324. web.NSInclude(
  325. &eta_trial.EtaTrialController{},
  326. ),
  327. ),
  328. web.NSNamespace("/user_login",
  329. web.NSInclude(
  330. &controllers.UserLoginController{},
  331. &controllers.UserLoginAuthController{},
  332. ),
  333. ),
  334. web.NSNamespace("/meeting_probabilities",
  335. web.NSInclude(
  336. &controllers.MeetingProbabilitiesController{},
  337. ),
  338. ),
  339. web.NSNamespace("/data_stat/",
  340. web.NSInclude(
  341. &data_stat.EdbSourceStatController{},
  342. &data_stat.EdbTerminalController{},
  343. ),
  344. ),
  345. web.NSNamespace("/smart_report",
  346. web.NSInclude(
  347. &smart_report.SmartReportController{},
  348. &smart_report.SmartReportResourceController{},
  349. ),
  350. ),
  351. web.NSNamespace("/chart_framework",
  352. web.NSInclude(
  353. &data_manage.ChartFrameworkController{},
  354. ),
  355. ),
  356. web.NSNamespace("/cross_variety", //跨品种分析
  357. web.NSInclude(
  358. &cross_variety.ClassifyController{},
  359. &cross_variety.ChartInfoController{},
  360. &cross_variety.VarietyController{},
  361. &cross_variety.TagController{},
  362. ),
  363. ),
  364. web.NSNamespace("/report_approve",
  365. web.NSInclude(
  366. &report_approve.ReportApproveController{},
  367. &report_approve.ReportApproveFlowController{},
  368. ),
  369. ),
  370. web.NSNamespace("/ai",
  371. web.NSInclude(
  372. &ai.AiController{},
  373. &ai.AiController{},
  374. &ai.AiFileController{},
  375. ),
  376. ),
  377. web.NSNamespace("/data_source",
  378. web.NSInclude(
  379. &data_source.DataSourceController{},
  380. &data_source.DataSourceIcpiController{},
  381. ),
  382. ),
  383. web.NSNamespace("/permission",
  384. web.NSInclude(
  385. &controllers.ChartPermissionController{},
  386. ),
  387. ),
  388. web.NSNamespace("/speech_recognition",
  389. web.NSInclude(
  390. &speech_recognition.SpeechRecognitionCommonController{},
  391. &speech_recognition.SpeechRecognitionController{},
  392. &speech_recognition.SpeechRecognitionMenuController{},
  393. &speech_recognition.SpeechRecognitionTagController{},
  394. &speech_recognition.SpeechRecognitionTagMenuController{},
  395. ),
  396. ),
  397. web.NSNamespace("/fe_calendar",
  398. web.NSInclude(
  399. &fe_calendar.FeCalendarMatterController{},
  400. ),
  401. ),
  402. web.NSNamespace("/message",
  403. web.NSInclude(
  404. &controllers.MessageController{},
  405. ),
  406. ),
  407. web.NSNamespace("/range_analysis",
  408. web.NSInclude(
  409. &range_analysis.RangeChartClassifyController{},
  410. &range_analysis.RangeChartChartInfoController{},
  411. ),
  412. ),
  413. web.NSNamespace("/document_manage",
  414. web.NSInclude(
  415. &document_manage.DocumentManageController{},
  416. ),
  417. ),
  418. web.NSNamespace("/stl_decompose",
  419. web.NSInclude(
  420. &stl.STLController{},
  421. ),
  422. ),
  423. web.NSNamespace("/edb_monitor",
  424. web.NSInclude(
  425. &edb_monitor.EdbMonitorController{},
  426. &edb_monitor.EdbMonitorClassifyController{},
  427. &edb_monitor.EdbMonitorMessageController{},
  428. ),
  429. ),
  430. web.NSNamespace("/bi_dashborad",
  431. web.NSInclude(
  432. &controllers.BIDaShboardController{},
  433. ),
  434. ),
  435. web.NSNamespace("/material",
  436. web.NSInclude(
  437. &material.MaterialController{},
  438. ),
  439. ),
  440. web.NSNamespace("/residual_analysis",
  441. web.NSInclude(
  442. &residual_analysis.ResidualAnalysisController{},
  443. ),
  444. ),
  445. web.NSNamespace("/ai_predict_model",
  446. web.NSInclude(
  447. &ai_predict_model.AiPredictModelClassifyController{},
  448. &ai_predict_model.AiPredictModelIndexController{},
  449. ),
  450. ),
  451. web.NSNamespace("/eta_forum",
  452. web.NSInclude(
  453. &eta_forum.EtaForumController{},
  454. ),
  455. ),
  456. )
  457. web.AddNamespace(ns)
  458. }