router.go 12 KB

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