router.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  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. ),
  191. ),
  192. web.NSNamespace("/my_chart",
  193. web.NSInclude(
  194. &data_manage.MyChartController{},
  195. ),
  196. ),
  197. web.NSNamespace("/roadshow",
  198. web.NSInclude(
  199. &roadshow.CalendarController{},
  200. ),
  201. ),
  202. web.NSNamespace("/taglib",
  203. web.NSInclude(
  204. &controllers.VarietyTagController{},
  205. ),
  206. ),
  207. web.NSNamespace("/sandbox",
  208. web.NSInclude(
  209. &sandbox.SandboxController{},
  210. ),
  211. ),
  212. web.NSNamespace("/pdfToImg",
  213. web.NSInclude(
  214. &controllers.PdfToImgCommonController{},
  215. ),
  216. ),
  217. web.NSNamespace("/english_report",
  218. web.NSInclude(
  219. &english_report.EnglishReportController{},
  220. &english_report.EnglishPolicyReportController{},
  221. &english_report.EnglishReportEmailController{},
  222. &english_report.EnglishCompanyController{},
  223. &english_report.EnglishCompanyTodoController{},
  224. &english_report.EnglishAuthController{},
  225. &english_report.EnglishReportEmailCallBackController{},
  226. &english_report.EnglishVideoController{},
  227. ),
  228. ),
  229. web.NSNamespace("/report_author",
  230. web.NSInclude(
  231. &controllers.ReportAuthorCommonController{},
  232. ),
  233. web.NSInclude(
  234. &controllers.ReportAuthorController{},
  235. ),
  236. ),
  237. web.NSNamespace("/future_good",
  238. web.NSInclude(
  239. &future_good2.FutureGoodEdbInfoController{},
  240. &future_good2.FutureGoodChartClassifyController{},
  241. &future_good2.FutureGoodChartInfoController{},
  242. ),
  243. ),
  244. web.NSNamespace("/correlation",
  245. web.NSInclude(
  246. &correlation.CorrelationChartClassifyController{},
  247. &correlation.CorrelationChartInfoController{},
  248. ),
  249. ),
  250. web.NSNamespace("/line_equation",
  251. web.NSInclude(
  252. &line_equation.LineEquationChartClassifyController{},
  253. &line_equation.LineEquationChartInfoController{},
  254. ),
  255. ),
  256. web.NSNamespace("/line_feature",
  257. web.NSInclude(
  258. &line_feature.LineFeaturesChartClassifyController{},
  259. &line_feature.LineFeaturesChartInfoController{},
  260. ),
  261. ),
  262. web.NSNamespace("/cloud_disk",
  263. web.NSInclude(
  264. &controllers.CloudDiskController{},
  265. ),
  266. ),
  267. web.NSNamespace("/semantic_analysis",
  268. web.NSInclude(
  269. &semantic_analysis.SaLabelController{},
  270. &semantic_analysis.SaDocClassifyController{},
  271. &semantic_analysis.SaDocController{},
  272. &semantic_analysis.SaCompareClassifyController{},
  273. &semantic_analysis.SaCompareController{},
  274. ),
  275. ),
  276. web.NSNamespace("/supply_analysis",
  277. web.NSInclude(
  278. &supply_analysis.VarietyController{},
  279. ),
  280. ),
  281. web.NSNamespace("/en_permission",
  282. web.NSInclude(
  283. &english_report.EnPermissionController{},
  284. ),
  285. ),
  286. web.NSNamespace("/english_classify",
  287. web.NSInclude(
  288. &english_report.EnglishClassifyController{},
  289. ),
  290. ),
  291. web.NSNamespace("/business_conf",
  292. web.NSInclude(
  293. &controllers.BusinessConfController{},
  294. &controllers.BusinessConfOpenController{},
  295. ),
  296. ),
  297. web.NSNamespace("/trade_analysis",
  298. web.NSInclude(
  299. &trade_analysis.TradeAnalysisController{},
  300. &trade_analysis.WarehouseClassifyController{},
  301. &trade_analysis.WarehouseController{},
  302. &trade_analysis.TradeAnalysisTableController{},
  303. &trade_analysis.TradeAnalysisCorrelationController{},
  304. ),
  305. ),
  306. web.NSNamespace("/custom_analysis",
  307. web.NSInclude(
  308. &excel.CustomAnalysisController{},
  309. ),
  310. ),
  311. web.NSNamespace("/out_link",
  312. web.NSInclude(
  313. &controllers.OutLinkController{},
  314. ),
  315. ),
  316. web.NSNamespace("/user_login",
  317. web.NSInclude(
  318. &controllers.UserLoginController{},
  319. &controllers.UserLoginAuthController{},
  320. ),
  321. ),
  322. web.NSNamespace("/eta_trial",
  323. web.NSInclude(
  324. &eta_trial.EtaTrialController{},
  325. ),
  326. ),
  327. web.NSNamespace("/user_login",
  328. web.NSInclude(
  329. &controllers.UserLoginController{},
  330. &controllers.UserLoginAuthController{},
  331. ),
  332. ),
  333. web.NSNamespace("/meeting_probabilities",
  334. web.NSInclude(
  335. &controllers.MeetingProbabilitiesController{},
  336. ),
  337. ),
  338. web.NSNamespace("/data_stat/",
  339. web.NSInclude(
  340. &data_stat.EdbSourceStatController{},
  341. &data_stat.EdbTerminalController{},
  342. ),
  343. ),
  344. web.NSNamespace("/smart_report",
  345. web.NSInclude(
  346. &smart_report.SmartReportController{},
  347. &smart_report.SmartReportResourceController{},
  348. ),
  349. ),
  350. web.NSNamespace("/chart_framework",
  351. web.NSInclude(
  352. &data_manage.ChartFrameworkController{},
  353. ),
  354. ),
  355. web.NSNamespace("/cross_variety", //跨品种分析
  356. web.NSInclude(
  357. &cross_variety.ClassifyController{},
  358. &cross_variety.ChartInfoController{},
  359. &cross_variety.VarietyController{},
  360. &cross_variety.TagController{},
  361. ),
  362. ),
  363. web.NSNamespace("/report_approve",
  364. web.NSInclude(
  365. &report_approve.ReportApproveController{},
  366. &report_approve.ReportApproveFlowController{},
  367. ),
  368. ),
  369. web.NSNamespace("/ai",
  370. web.NSInclude(
  371. &ai.AiController{},
  372. &ai.AiController{},
  373. &ai.AiFileController{},
  374. ),
  375. ),
  376. web.NSNamespace("/data_source",
  377. web.NSInclude(
  378. &data_source.DataSourceController{},
  379. &data_source.DataSourceIcpiController{},
  380. ),
  381. ),
  382. web.NSNamespace("/permission",
  383. web.NSInclude(
  384. &controllers.ChartPermissionController{},
  385. ),
  386. ),
  387. web.NSNamespace("/speech_recognition",
  388. web.NSInclude(
  389. &speech_recognition.SpeechRecognitionCommonController{},
  390. &speech_recognition.SpeechRecognitionController{},
  391. &speech_recognition.SpeechRecognitionMenuController{},
  392. &speech_recognition.SpeechRecognitionTagController{},
  393. &speech_recognition.SpeechRecognitionTagMenuController{},
  394. ),
  395. ),
  396. web.NSNamespace("/fe_calendar",
  397. web.NSInclude(
  398. &fe_calendar.FeCalendarMatterController{},
  399. ),
  400. ),
  401. web.NSNamespace("/message",
  402. web.NSInclude(
  403. &controllers.MessageController{},
  404. ),
  405. ),
  406. web.NSNamespace("/range_analysis",
  407. web.NSInclude(
  408. &range_analysis.RangeChartClassifyController{},
  409. &range_analysis.RangeChartChartInfoController{},
  410. ),
  411. ),
  412. web.NSNamespace("/document_manage",
  413. web.NSInclude(
  414. &document_manage.DocumentManageController{},
  415. ),
  416. ),
  417. web.NSNamespace("/stl_decompose",
  418. web.NSInclude(
  419. &stl.STLController{},
  420. ),
  421. ),
  422. web.NSNamespace("/edb_monitor",
  423. web.NSInclude(
  424. &edb_monitor.EdbMonitorController{},
  425. &edb_monitor.EdbMonitorClassifyController{},
  426. &edb_monitor.EdbMonitorMessageController{},
  427. ),
  428. ),
  429. web.NSNamespace("/bi_dashborad",
  430. web.NSInclude(
  431. &controllers.BIDaShboardController{},
  432. ),
  433. ),
  434. web.NSNamespace("/material",
  435. web.NSInclude(
  436. &material.MaterialController{},
  437. ),
  438. ),
  439. web.NSNamespace("/residual_analysis",
  440. web.NSInclude(
  441. &residual_analysis.ResidualAnalysisController{},
  442. ),
  443. ),
  444. web.NSNamespace("/ai_predict_model",
  445. web.NSInclude(
  446. &ai_predict_model.AiPredictModelClassifyController{},
  447. &ai_predict_model.AiPredictModelIndexController{},
  448. ),
  449. ),
  450. web.NSNamespace("/eta_forum",
  451. web.NSInclude(
  452. &eta_forum.EtaForumController{},
  453. ),
  454. ),
  455. )
  456. web.AddNamespace(ns)
  457. }