router.go 10 KB

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