router.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  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/correlation"
  14. "eta/eta_api/controllers/data_manage/cross_variety"
  15. "eta/eta_api/controllers/data_manage/data_manage_permission"
  16. "eta/eta_api/controllers/data_manage/excel"
  17. future_good2 "eta/eta_api/controllers/data_manage/future_good"
  18. "eta/eta_api/controllers/data_manage/line_equation"
  19. "eta/eta_api/controllers/data_manage/line_feature"
  20. "eta/eta_api/controllers/data_manage/range_analysis"
  21. "eta/eta_api/controllers/data_manage/stl"
  22. "eta/eta_api/controllers/data_manage/supply_analysis"
  23. "eta/eta_api/controllers/data_source"
  24. "eta/eta_api/controllers/data_stat"
  25. "eta/eta_api/controllers/document_manage"
  26. "eta/eta_api/controllers/edb_monitor"
  27. "eta/eta_api/controllers/english_report"
  28. "eta/eta_api/controllers/eta_trial"
  29. "eta/eta_api/controllers/fe_calendar"
  30. "eta/eta_api/controllers/material"
  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.EdbInfoRelationController{},
  178. &data_manage.FactorEdbSeriesController{},
  179. &data_manage.SciHqDataController{},
  180. &data_manage.BaseFromThsHfController{},
  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("/user_login",
  310. web.NSInclude(
  311. &controllers.UserLoginController{},
  312. &controllers.UserLoginAuthController{},
  313. ),
  314. ),
  315. web.NSNamespace("/eta_trial",
  316. web.NSInclude(
  317. &eta_trial.EtaTrialController{},
  318. ),
  319. ),
  320. web.NSNamespace("/user_login",
  321. web.NSInclude(
  322. &controllers.UserLoginController{},
  323. &controllers.UserLoginAuthController{},
  324. ),
  325. ),
  326. web.NSNamespace("/meeting_probabilities",
  327. web.NSInclude(
  328. &controllers.MeetingProbabilitiesController{},
  329. ),
  330. ),
  331. web.NSNamespace("/data_stat/",
  332. web.NSInclude(
  333. &data_stat.EdbSourceStatController{},
  334. &data_stat.EdbTerminalController{},
  335. ),
  336. ),
  337. web.NSNamespace("/smart_report",
  338. web.NSInclude(
  339. &smart_report.SmartReportController{},
  340. &smart_report.SmartReportResourceController{},
  341. ),
  342. ),
  343. web.NSNamespace("/chart_framework",
  344. web.NSInclude(
  345. &data_manage.ChartFrameworkController{},
  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("/ai",
  363. web.NSInclude(
  364. &ai.AiController{},
  365. &ai.AiController{},
  366. &ai.AiFileController{},
  367. ),
  368. ),
  369. web.NSNamespace("/data_source",
  370. web.NSInclude(
  371. &data_source.DataSourceController{},
  372. &data_source.DataSourceIcpiController{},
  373. ),
  374. ),
  375. web.NSNamespace("/permission",
  376. web.NSInclude(
  377. &controllers.ChartPermissionController{},
  378. ),
  379. ),
  380. web.NSNamespace("/speech_recognition",
  381. web.NSInclude(
  382. &speech_recognition.SpeechRecognitionCommonController{},
  383. &speech_recognition.SpeechRecognitionController{},
  384. &speech_recognition.SpeechRecognitionMenuController{},
  385. &speech_recognition.SpeechRecognitionTagController{},
  386. &speech_recognition.SpeechRecognitionTagMenuController{},
  387. ),
  388. ),
  389. web.NSNamespace("/fe_calendar",
  390. web.NSInclude(
  391. &fe_calendar.FeCalendarMatterController{},
  392. ),
  393. ),
  394. web.NSNamespace("/message",
  395. web.NSInclude(
  396. &controllers.MessageController{},
  397. ),
  398. ),
  399. web.NSNamespace("/range_analysis",
  400. web.NSInclude(
  401. &range_analysis.RangeChartClassifyController{},
  402. &range_analysis.RangeChartChartInfoController{},
  403. ),
  404. ),
  405. web.NSNamespace("/document_manage",
  406. web.NSInclude(
  407. &document_manage.DocumentManageController{},
  408. ),
  409. ),
  410. web.NSNamespace("/stl_decompose",
  411. web.NSInclude(
  412. &stl.STLController{},
  413. ),
  414. ),
  415. web.NSNamespace("/edb_monitor",
  416. web.NSInclude(
  417. &edb_monitor.EdbMonitorController{},
  418. &edb_monitor.EdbMonitorClassifyController{},
  419. &edb_monitor.EdbMonitorMessageController{},
  420. ),
  421. ),
  422. web.NSNamespace("/bi_dashborad",
  423. web.NSInclude(
  424. &controllers.BIDaShboardController{},
  425. ),
  426. ),
  427. web.NSNamespace("/material",
  428. web.NSInclude(
  429. &material.MaterialController{},
  430. ),
  431. ),
  432. web.NSNamespace("/residual_analysis",
  433. web.NSInclude(
  434. &residual_analysis.ResidualAnalysisController{},
  435. ),
  436. ),
  437. )
  438. web.AddNamespace(ns)
  439. }