router.go 12 KB

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