router.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  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. &data_manage.ClarksonsDataController{},
  189. ),
  190. ),
  191. web.NSNamespace("/my_chart",
  192. web.NSInclude(
  193. &data_manage.MyChartController{},
  194. ),
  195. ),
  196. web.NSNamespace("/roadshow",
  197. web.NSInclude(
  198. &roadshow.CalendarController{},
  199. ),
  200. ),
  201. web.NSNamespace("/taglib",
  202. web.NSInclude(
  203. &controllers.VarietyTagController{},
  204. ),
  205. ),
  206. web.NSNamespace("/sandbox",
  207. web.NSInclude(
  208. &sandbox.SandboxController{},
  209. ),
  210. ),
  211. web.NSNamespace("/pdfToImg",
  212. web.NSInclude(
  213. &controllers.PdfToImgCommonController{},
  214. ),
  215. ),
  216. web.NSNamespace("/english_report",
  217. web.NSInclude(
  218. &english_report.EnglishReportController{},
  219. &english_report.EnglishPolicyReportController{},
  220. &english_report.EnglishReportEmailController{},
  221. &english_report.EnglishCompanyController{},
  222. &english_report.EnglishCompanyTodoController{},
  223. &english_report.EnglishAuthController{},
  224. &english_report.EnglishReportEmailCallBackController{},
  225. &english_report.EnglishVideoController{},
  226. ),
  227. ),
  228. web.NSNamespace("/report_author",
  229. web.NSInclude(
  230. &controllers.ReportAuthorCommonController{},
  231. ),
  232. web.NSInclude(
  233. &controllers.ReportAuthorController{},
  234. ),
  235. ),
  236. web.NSNamespace("/future_good",
  237. web.NSInclude(
  238. &future_good2.FutureGoodEdbInfoController{},
  239. &future_good2.FutureGoodChartClassifyController{},
  240. &future_good2.FutureGoodChartInfoController{},
  241. ),
  242. ),
  243. web.NSNamespace("/correlation",
  244. web.NSInclude(
  245. &correlation.CorrelationChartClassifyController{},
  246. &correlation.CorrelationChartInfoController{},
  247. ),
  248. ),
  249. web.NSNamespace("/line_equation",
  250. web.NSInclude(
  251. &line_equation.LineEquationChartClassifyController{},
  252. &line_equation.LineEquationChartInfoController{},
  253. ),
  254. ),
  255. web.NSNamespace("/line_feature",
  256. web.NSInclude(
  257. &line_feature.LineFeaturesChartClassifyController{},
  258. &line_feature.LineFeaturesChartInfoController{},
  259. ),
  260. ),
  261. web.NSNamespace("/cloud_disk",
  262. web.NSInclude(
  263. &controllers.CloudDiskController{},
  264. ),
  265. ),
  266. web.NSNamespace("/semantic_analysis",
  267. web.NSInclude(
  268. &semantic_analysis.SaLabelController{},
  269. &semantic_analysis.SaDocClassifyController{},
  270. &semantic_analysis.SaDocController{},
  271. &semantic_analysis.SaCompareClassifyController{},
  272. &semantic_analysis.SaCompareController{},
  273. ),
  274. ),
  275. web.NSNamespace("/supply_analysis",
  276. web.NSInclude(
  277. &supply_analysis.VarietyController{},
  278. ),
  279. ),
  280. web.NSNamespace("/en_permission",
  281. web.NSInclude(
  282. &english_report.EnPermissionController{},
  283. ),
  284. ),
  285. web.NSNamespace("/english_classify",
  286. web.NSInclude(
  287. &english_report.EnglishClassifyController{},
  288. ),
  289. ),
  290. web.NSNamespace("/business_conf",
  291. web.NSInclude(
  292. &controllers.BusinessConfController{},
  293. &controllers.BusinessConfOpenController{},
  294. ),
  295. ),
  296. web.NSNamespace("/trade_analysis",
  297. web.NSInclude(
  298. &trade_analysis.TradeAnalysisController{},
  299. &trade_analysis.WarehouseClassifyController{},
  300. &trade_analysis.WarehouseController{},
  301. &trade_analysis.TradeAnalysisTableController{},
  302. &trade_analysis.TradeAnalysisCorrelationController{},
  303. ),
  304. ),
  305. web.NSNamespace("/custom_analysis",
  306. web.NSInclude(
  307. &excel.CustomAnalysisController{},
  308. ),
  309. ),
  310. web.NSNamespace("/out_link",
  311. web.NSInclude(
  312. &controllers.OutLinkController{},
  313. ),
  314. ),
  315. web.NSNamespace("/user_login",
  316. web.NSInclude(
  317. &controllers.UserLoginController{},
  318. &controllers.UserLoginAuthController{},
  319. ),
  320. ),
  321. web.NSNamespace("/eta_trial",
  322. web.NSInclude(
  323. &eta_trial.EtaTrialController{},
  324. ),
  325. ),
  326. web.NSNamespace("/user_login",
  327. web.NSInclude(
  328. &controllers.UserLoginController{},
  329. &controllers.UserLoginAuthController{},
  330. ),
  331. ),
  332. web.NSNamespace("/meeting_probabilities",
  333. web.NSInclude(
  334. &controllers.MeetingProbabilitiesController{},
  335. ),
  336. ),
  337. web.NSNamespace("/data_stat/",
  338. web.NSInclude(
  339. &data_stat.EdbSourceStatController{},
  340. &data_stat.EdbTerminalController{},
  341. ),
  342. ),
  343. web.NSNamespace("/smart_report",
  344. web.NSInclude(
  345. &smart_report.SmartReportController{},
  346. &smart_report.SmartReportResourceController{},
  347. ),
  348. ),
  349. web.NSNamespace("/chart_framework",
  350. web.NSInclude(
  351. &data_manage.ChartFrameworkController{},
  352. ),
  353. ),
  354. web.NSNamespace("/cross_variety", //跨品种分析
  355. web.NSInclude(
  356. &cross_variety.ClassifyController{},
  357. &cross_variety.ChartInfoController{},
  358. &cross_variety.VarietyController{},
  359. &cross_variety.TagController{},
  360. ),
  361. ),
  362. web.NSNamespace("/report_approve",
  363. web.NSInclude(
  364. &report_approve.ReportApproveController{},
  365. &report_approve.ReportApproveFlowController{},
  366. ),
  367. ),
  368. web.NSNamespace("/ai",
  369. web.NSInclude(
  370. &ai.AiController{},
  371. &ai.AiController{},
  372. &ai.AiFileController{},
  373. ),
  374. ),
  375. web.NSNamespace("/data_source",
  376. web.NSInclude(
  377. &data_source.DataSourceController{},
  378. &data_source.DataSourceIcpiController{},
  379. ),
  380. ),
  381. web.NSNamespace("/permission",
  382. web.NSInclude(
  383. &controllers.ChartPermissionController{},
  384. ),
  385. ),
  386. web.NSNamespace("/speech_recognition",
  387. web.NSInclude(
  388. &speech_recognition.SpeechRecognitionCommonController{},
  389. &speech_recognition.SpeechRecognitionController{},
  390. &speech_recognition.SpeechRecognitionMenuController{},
  391. &speech_recognition.SpeechRecognitionTagController{},
  392. &speech_recognition.SpeechRecognitionTagMenuController{},
  393. ),
  394. ),
  395. web.NSNamespace("/fe_calendar",
  396. web.NSInclude(
  397. &fe_calendar.FeCalendarMatterController{},
  398. ),
  399. ),
  400. web.NSNamespace("/message",
  401. web.NSInclude(
  402. &controllers.MessageController{},
  403. ),
  404. ),
  405. web.NSNamespace("/range_analysis",
  406. web.NSInclude(
  407. &range_analysis.RangeChartClassifyController{},
  408. &range_analysis.RangeChartChartInfoController{},
  409. ),
  410. ),
  411. web.NSNamespace("/document_manage",
  412. web.NSInclude(
  413. &document_manage.DocumentManageController{},
  414. ),
  415. ),
  416. web.NSNamespace("/stl_decompose",
  417. web.NSInclude(
  418. &stl.STLController{},
  419. ),
  420. ),
  421. web.NSNamespace("/edb_monitor",
  422. web.NSInclude(
  423. &edb_monitor.EdbMonitorController{},
  424. &edb_monitor.EdbMonitorClassifyController{},
  425. &edb_monitor.EdbMonitorMessageController{},
  426. ),
  427. ),
  428. web.NSNamespace("/bi_dashborad",
  429. web.NSInclude(
  430. &controllers.BIDaShboardController{},
  431. ),
  432. ),
  433. web.NSNamespace("/material",
  434. web.NSInclude(
  435. &material.MaterialController{},
  436. ),
  437. ),
  438. web.NSNamespace("/residual_analysis",
  439. web.NSInclude(
  440. &residual_analysis.ResidualAnalysisController{},
  441. ),
  442. ),
  443. web.NSNamespace("/ai_predict_model",
  444. web.NSInclude(
  445. &ai_predict_model.AiPredictModelClassifyController{},
  446. &ai_predict_model.AiPredictModelIndexController{},
  447. ),
  448. ),
  449. )
  450. web.AddNamespace(ns)
  451. }