router.go 12 KB

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