router.go 12 KB

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