router.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  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. "github.com/beego/beego/v2/server/web"
  42. "github.com/beego/beego/v2/server/web/filter/cors"
  43. )
  44. func init() {
  45. //解决跨域问题
  46. web.InsertFilter("*", web.BeforeRouter, cors.Allow(&cors.Options{
  47. AllowAllOrigins: true,
  48. AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
  49. AllowHeaders: []string{"Origin", "Authorization", "Uuid", "Accesstoken", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
  50. ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
  51. AllowCredentials: true,
  52. }))
  53. ns := web.NewNamespace("/adminapi",
  54. web.NSNamespace("/sysuser",
  55. web.NSInclude(
  56. &controllers.SysUserController{},
  57. ),
  58. web.NSInclude(
  59. &controllers.SysUserAuthController{},
  60. ),
  61. ),
  62. web.NSNamespace("/classify",
  63. web.NSInclude(
  64. &controllers.ClassifyController{},
  65. ),
  66. ),
  67. web.NSNamespace("/banner",
  68. web.NSInclude(
  69. &controllers.BannerController{},
  70. ),
  71. ),
  72. web.NSNamespace("/report",
  73. web.NSInclude(
  74. &controllers.ReportController{},
  75. &controllers.ReportChapterTypeController{},
  76. ),
  77. web.NSInclude(
  78. &controllers.ReportCommonController{},
  79. ),
  80. web.NSInclude(
  81. &controllers.ReportUploadCommonController{},
  82. ),
  83. ),
  84. web.NSNamespace("/voice",
  85. web.NSInclude(
  86. &controllers.VoiceController{},
  87. ),
  88. web.NSInclude(
  89. &controllers.VoiceCommonController{},
  90. ),
  91. ),
  92. web.NSNamespace("/pptv2",
  93. web.NSInclude(
  94. &controllers.PptV2Controller{},
  95. &controllers.PptV2GroupController{},
  96. ),
  97. web.NSInclude(
  98. &controllers.PptV2CommonController{},
  99. ),
  100. ),
  101. web.NSNamespace("/ppt_english",
  102. web.NSInclude(
  103. &controllers.PptEnglishController{},
  104. &controllers.PptEnglishGroupController{},
  105. ),
  106. web.NSInclude(
  107. &controllers.PptEnglishCommonController{},
  108. ),
  109. ),
  110. web.NSNamespace("/entry",
  111. web.NSInclude(
  112. &controllers.TargetController{},
  113. &data_manage.ManualEdbController{},
  114. ),
  115. web.NSInclude(
  116. &controllers.TargetCommonController{},
  117. ),
  118. web.NSInclude(
  119. &controllers.TradeCommonController{},
  120. ),
  121. ),
  122. web.NSNamespace("/system",
  123. web.NSInclude(
  124. &controllers.SysDepartmentController{},
  125. ),
  126. web.NSInclude(
  127. &controllers.SysGroupController{},
  128. ),
  129. web.NSInclude(
  130. &controllers.SysTeamController{},
  131. ),
  132. web.NSInclude(
  133. &controllers.SysAdminController{},
  134. ),
  135. web.NSInclude(
  136. &controllers.SysRoleController{},
  137. &controllers.SysRoleAdminController{},
  138. ),
  139. web.NSInclude(
  140. &controllers.SysMenuController{},
  141. ),
  142. web.NSInclude(
  143. &controllers.SysMenuButtonController{},
  144. ),
  145. web.NSInclude(
  146. &controllers.ResearchGroupController{},
  147. ),
  148. ),
  149. web.NSNamespace("/custom",
  150. web.NSInclude(
  151. &controllers.CompanySellerController{},
  152. &controllers.CompanyPermissionController{},
  153. ),
  154. ),
  155. web.NSNamespace("/resource",
  156. web.NSInclude(
  157. &controllers.ResourceController{},
  158. &controllers.ResourceAuthController{},
  159. ),
  160. ),
  161. web.NSNamespace("/datamanage",
  162. web.NSInclude(
  163. &data_manage.EdbInfoController{},
  164. &data_manage.EdbClassifyController{},
  165. &data_manage.ChartClassifyController{},
  166. &data_manage.ChartInfoController{},
  167. &data_manage.ManualController{},
  168. &data_manage.BaseFromChangesVisitorsCovidController{},
  169. &excel.ExcelClassifyController{},
  170. &excel.ExcelInfoController{},
  171. &data_manage.PredictEdbClassifyController{},
  172. &data_manage.PredictEdbInfoController{},
  173. &data_manage.BaseFromNationalStatisticsController{},
  174. &data_manage.JiaYueEdbSourceController{},
  175. &data_manage.ChartThemeController{},
  176. &data_manage_permission.DataMangePermissionController{},
  177. &data_manage.BloombergDataController{},
  178. &data_manage.EdbBusinessController{},
  179. &data_manage.BaseFromThsHfController{},
  180. &data_manage.EdbInfoRelationController{},
  181. &data_manage.FactorEdbSeriesController{},
  182. &data_manage.SciHqDataController{},
  183. &data_manage.BaseFromLyClassifyController{},
  184. &data_manage.BaseFromLyIndexController{},
  185. &data_manage.BaseFromUsdaFasController{},
  186. &data_manage.BaseFromRzdIndexController{},
  187. &data_manage.ClarksonsDataController{},
  188. &data_manage.BaseFromGprRiskController{},
  189. &data_manage.BaseFromRadishResearchController{},
  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("/eta_trial",
  317. web.NSInclude(
  318. &eta_trial.EtaTrialController{},
  319. ),
  320. ),
  321. web.NSNamespace("/user_login",
  322. web.NSInclude(
  323. &controllers.UserLoginController{},
  324. &controllers.UserLoginAuthController{},
  325. ),
  326. ),
  327. web.NSNamespace("/meeting_probabilities",
  328. web.NSInclude(
  329. &controllers.MeetingProbabilitiesController{},
  330. ),
  331. ),
  332. web.NSNamespace("/data_stat/",
  333. web.NSInclude(
  334. &data_stat.EdbSourceStatController{},
  335. &data_stat.EdbTerminalController{},
  336. ),
  337. ),
  338. web.NSNamespace("/chart_framework",
  339. web.NSInclude(
  340. &data_manage.ChartFrameworkController{},
  341. ),
  342. ),
  343. web.NSNamespace("/smart_report",
  344. web.NSInclude(
  345. &smart_report.SmartReportController{},
  346. &smart_report.SmartReportResourceController{},
  347. ),
  348. ),
  349. web.NSNamespace("/ai",
  350. web.NSInclude(
  351. &ai.AiController{},
  352. &ai.AiFileController{},
  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("/data_source",
  370. web.NSInclude(
  371. &data_source.DataSourceController{},
  372. ),
  373. ),
  374. web.NSNamespace("/permission",
  375. web.NSInclude(
  376. &controllers.ChartPermissionController{},
  377. ),
  378. ),
  379. web.NSNamespace("/speech_recognition",
  380. web.NSInclude(
  381. &speech_recognition.SpeechRecognitionCommonController{},
  382. &speech_recognition.SpeechRecognitionController{},
  383. &speech_recognition.SpeechRecognitionMenuController{},
  384. &speech_recognition.SpeechRecognitionTagController{},
  385. &speech_recognition.SpeechRecognitionTagMenuController{},
  386. ),
  387. ),
  388. web.NSNamespace("/message",
  389. web.NSInclude(
  390. &controllers.MessageController{},
  391. ),
  392. ),
  393. web.NSNamespace("/fe_calendar",
  394. web.NSInclude(
  395. &fe_calendar.FeCalendarMatterController{},
  396. ),
  397. ),
  398. web.NSNamespace("/range_analysis",
  399. web.NSInclude(
  400. &range_analysis.RangeChartClassifyController{},
  401. &range_analysis.RangeChartChartInfoController{},
  402. ),
  403. ),
  404. web.NSNamespace("/document_manage",
  405. web.NSInclude(
  406. &document_manage.DocumentManageController{},
  407. ),
  408. ),
  409. web.NSNamespace("/material",
  410. web.NSInclude(
  411. &material.MaterialController{},
  412. ),
  413. ),
  414. web.NSNamespace("/stl_decompose",
  415. web.NSInclude(
  416. &stl.STLController{},
  417. ),
  418. ),
  419. web.NSNamespace("/edb_monitor",
  420. web.NSInclude(
  421. &edb_monitor.EdbMonitorController{},
  422. &edb_monitor.EdbMonitorClassifyController{},
  423. &edb_monitor.EdbMonitorMessageController{},
  424. ),
  425. ),
  426. web.NSNamespace("/bi_dashborad",
  427. web.NSInclude(
  428. &controllers.BIDaShboardController{},
  429. ),
  430. ),
  431. web.NSNamespace("/ai_predict_model",
  432. web.NSInclude(
  433. &ai_predict_model.AiPredictModelClassifyController{},
  434. &ai_predict_model.AiPredictModelIndexController{},
  435. &ai_predict_model.AiPredictModelFrameworkController{},
  436. ),
  437. ),
  438. web.NSNamespace("/residual_analysis",
  439. web.NSInclude(
  440. &residual_analysis.ResidualAnalysisController{},
  441. ),
  442. ),
  443. web.NSNamespace("/eta_forum",
  444. web.NSInclude(
  445. &eta_forum.EtaForumController{},
  446. ),
  447. ),
  448. )
  449. web.AddNamespace(ns)
  450. }