router.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  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. &data_manage.BaseFromGprRiskController{},
  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. )
  426. web.AddNamespace(ns)
  427. }