router.go 11 KB

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