router.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  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_gn/eta_api/controllers"
  11. "eta_gn/eta_api/controllers/ai"
  12. "eta_gn/eta_api/controllers/data_manage"
  13. "eta_gn/eta_api/controllers/data_manage/correlation"
  14. "eta_gn/eta_api/controllers/data_manage/cross_variety"
  15. "eta_gn/eta_api/controllers/data_manage/data_manage_permission"
  16. "eta_gn/eta_api/controllers/data_manage/excel"
  17. future_good2 "eta_gn/eta_api/controllers/data_manage/future_good"
  18. "eta_gn/eta_api/controllers/data_manage/line_equation"
  19. "eta_gn/eta_api/controllers/data_manage/line_feature"
  20. "eta_gn/eta_api/controllers/data_manage/range_analysis"
  21. "eta_gn/eta_api/controllers/data_manage/supply_analysis"
  22. "eta_gn/eta_api/controllers/data_source"
  23. "eta_gn/eta_api/controllers/data_stat"
  24. "eta_gn/eta_api/controllers/english_report"
  25. "eta_gn/eta_api/controllers/eta_trial"
  26. "eta_gn/eta_api/controllers/fe_calendar"
  27. "eta_gn/eta_api/controllers/report_approve"
  28. "eta_gn/eta_api/controllers/roadshow"
  29. "eta_gn/eta_api/controllers/sandbox"
  30. "eta_gn/eta_api/controllers/semantic_analysis"
  31. "eta_gn/eta_api/controllers/smart_report"
  32. "eta_gn/eta_api/controllers/speech_recognition"
  33. "eta_gn/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. ),
  177. ),
  178. web.NSNamespace("/my_chart",
  179. web.NSInclude(
  180. &data_manage.MyChartController{},
  181. ),
  182. ),
  183. web.NSNamespace("/roadshow",
  184. web.NSInclude(
  185. &roadshow.CalendarController{},
  186. ),
  187. ),
  188. web.NSNamespace("/taglib",
  189. web.NSInclude(
  190. &controllers.VarietyTagController{},
  191. ),
  192. ),
  193. web.NSNamespace("/sandbox",
  194. web.NSInclude(
  195. &sandbox.SandboxController{},
  196. ),
  197. ),
  198. web.NSNamespace("/pdfToImg",
  199. web.NSInclude(
  200. &controllers.PdfToImgCommonController{},
  201. ),
  202. ),
  203. web.NSNamespace("/english_report",
  204. web.NSInclude(
  205. &english_report.EnglishReportController{},
  206. &english_report.EnglishPolicyReportController{},
  207. &english_report.EnglishReportEmailController{},
  208. &english_report.EnglishCompanyController{},
  209. &english_report.EnglishCompanyTodoController{},
  210. &english_report.EnglishAuthController{},
  211. &english_report.EnglishReportEmailCallBackController{},
  212. &english_report.EnglishVideoController{},
  213. ),
  214. ),
  215. web.NSNamespace("/report_author",
  216. web.NSInclude(
  217. &controllers.ReportAuthorCommonController{},
  218. ),
  219. web.NSInclude(
  220. &controllers.ReportAuthorController{},
  221. ),
  222. ),
  223. web.NSNamespace("/future_good",
  224. web.NSInclude(
  225. &future_good2.FutureGoodEdbInfoController{},
  226. &future_good2.FutureGoodChartClassifyController{},
  227. &future_good2.FutureGoodChartInfoController{},
  228. ),
  229. ),
  230. web.NSNamespace("/correlation",
  231. web.NSInclude(
  232. &correlation.CorrelationChartClassifyController{},
  233. &correlation.CorrelationChartInfoController{},
  234. ),
  235. ),
  236. web.NSNamespace("/line_equation",
  237. web.NSInclude(
  238. &line_equation.LineEquationChartClassifyController{},
  239. &line_equation.LineEquationChartInfoController{},
  240. ),
  241. ),
  242. web.NSNamespace("/line_feature",
  243. web.NSInclude(
  244. &line_feature.LineFeaturesChartClassifyController{},
  245. &line_feature.LineFeaturesChartInfoController{},
  246. ),
  247. ),
  248. web.NSNamespace("/cloud_disk",
  249. web.NSInclude(
  250. &controllers.CloudDiskController{},
  251. ),
  252. ),
  253. web.NSNamespace("/semantic_analysis",
  254. web.NSInclude(
  255. &semantic_analysis.SaLabelController{},
  256. &semantic_analysis.SaDocClassifyController{},
  257. &semantic_analysis.SaDocController{},
  258. &semantic_analysis.SaCompareClassifyController{},
  259. &semantic_analysis.SaCompareController{},
  260. ),
  261. ),
  262. web.NSNamespace("/supply_analysis",
  263. web.NSInclude(
  264. &supply_analysis.VarietyController{},
  265. ),
  266. ),
  267. web.NSNamespace("/en_permission",
  268. web.NSInclude(
  269. &english_report.EnPermissionController{},
  270. ),
  271. ),
  272. web.NSNamespace("/english_classify",
  273. web.NSInclude(
  274. &english_report.EnglishClassifyController{},
  275. ),
  276. ),
  277. web.NSNamespace("/business_conf",
  278. web.NSInclude(
  279. &controllers.BusinessConfController{},
  280. &controllers.BusinessConfOpenController{},
  281. ),
  282. ),
  283. web.NSNamespace("/trade_analysis",
  284. web.NSInclude(
  285. &trade_analysis.TradeAnalysisController{},
  286. ),
  287. ),
  288. web.NSNamespace("/custom_analysis",
  289. web.NSInclude(
  290. &excel.CustomAnalysisController{},
  291. ),
  292. ),
  293. web.NSNamespace("/out_link",
  294. web.NSInclude(
  295. &controllers.OutLinkController{},
  296. ),
  297. ),
  298. web.NSNamespace("/eta_trial",
  299. web.NSInclude(
  300. &eta_trial.EtaTrialController{},
  301. ),
  302. ),
  303. web.NSNamespace("/user_login",
  304. web.NSInclude(
  305. &controllers.UserLoginController{},
  306. &controllers.UserLoginAuthController{},
  307. ),
  308. ),
  309. web.NSNamespace("/meeting_probabilities",
  310. web.NSInclude(
  311. &controllers.MeetingProbabilitiesController{},
  312. ),
  313. ),
  314. web.NSNamespace("/data_stat/",
  315. web.NSInclude(
  316. &data_stat.EdbSourceStatController{},
  317. &data_stat.EdbTerminalController{},
  318. ),
  319. ),
  320. web.NSNamespace("/chart_framework",
  321. web.NSInclude(
  322. &data_manage.ChartFrameworkController{},
  323. ),
  324. ),
  325. web.NSNamespace("/smart_report",
  326. web.NSInclude(
  327. &smart_report.SmartReportController{},
  328. &smart_report.SmartReportResourceController{},
  329. ),
  330. ),
  331. web.NSNamespace("/ai",
  332. web.NSInclude(
  333. &ai.AiController{},
  334. &ai.AiFileController{},
  335. ),
  336. ),
  337. web.NSNamespace("/cross_variety", //跨品种分析
  338. web.NSInclude(
  339. &cross_variety.ClassifyController{},
  340. &cross_variety.ChartInfoController{},
  341. &cross_variety.VarietyController{},
  342. &cross_variety.TagController{},
  343. ),
  344. ),
  345. web.NSNamespace("/report_approve",
  346. web.NSInclude(
  347. &report_approve.ReportApproveController{},
  348. &report_approve.ReportApproveFlowController{},
  349. ),
  350. ),
  351. web.NSNamespace("/data_source",
  352. web.NSInclude(
  353. &data_source.DataSourceController{},
  354. ),
  355. ),
  356. web.NSNamespace("/permission",
  357. web.NSInclude(
  358. &controllers.ChartPermissionController{},
  359. ),
  360. ),
  361. web.NSNamespace("/speech_recognition",
  362. web.NSInclude(
  363. &speech_recognition.SpeechRecognitionCommonController{},
  364. &speech_recognition.SpeechRecognitionController{},
  365. &speech_recognition.SpeechRecognitionMenuController{},
  366. &speech_recognition.SpeechRecognitionTagController{},
  367. &speech_recognition.SpeechRecognitionTagMenuController{},
  368. ),
  369. ),
  370. web.NSNamespace("/message",
  371. web.NSInclude(
  372. &controllers.MessageController{},
  373. ),
  374. ),
  375. web.NSNamespace("/fe_calendar",
  376. web.NSInclude(
  377. &fe_calendar.FeCalendarMatterController{},
  378. ),
  379. ),
  380. web.NSNamespace("/range_analysis",
  381. web.NSInclude(
  382. &range_analysis.RangeChartClassifyController{},
  383. &range_analysis.RangeChartChartInfoController{},
  384. ),
  385. ),
  386. )
  387. web.AddNamespace(ns)
  388. }