router.go 11 KB

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