router.go 11 KB

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