router.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  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. ),
  106. web.NSInclude(
  107. &controllers.TargetCommonController{},
  108. ),
  109. web.NSInclude(
  110. &controllers.TradeCommonController{},
  111. ),
  112. ),
  113. web.NSNamespace("/system",
  114. web.NSInclude(
  115. &controllers.SysDepartmentController{},
  116. ),
  117. web.NSInclude(
  118. &controllers.SysGroupController{},
  119. ),
  120. web.NSInclude(
  121. &controllers.SysTeamController{},
  122. ),
  123. web.NSInclude(
  124. &controllers.SysAdminController{},
  125. ),
  126. web.NSInclude(
  127. &controllers.SysRoleController{},
  128. &controllers.SysRoleAdminController{},
  129. ),
  130. web.NSInclude(
  131. &controllers.SysMenuController{},
  132. ),
  133. web.NSInclude(
  134. &controllers.SysMenuButtonController{},
  135. ),
  136. web.NSInclude(
  137. &controllers.ResearchGroupController{},
  138. ),
  139. ),
  140. web.NSNamespace("/custom",
  141. web.NSInclude(
  142. &controllers.CompanySellerController{},
  143. &controllers.CompanyPermissionController{},
  144. ),
  145. ),
  146. web.NSNamespace("/resource",
  147. web.NSInclude(
  148. &controllers.ResourceController{},
  149. &controllers.ResourceAuthController{},
  150. ),
  151. ),
  152. web.NSNamespace("/datamanage",
  153. web.NSInclude(
  154. &data_manage.EdbInfoController{},
  155. &data_manage.EdbClassifyController{},
  156. &data_manage.ChartClassifyController{},
  157. &data_manage.ChartInfoController{},
  158. &data_manage.ManualController{},
  159. &data_manage.BaseFromChangesVisitorsCovidController{},
  160. &excel.ExcelClassifyController{},
  161. &excel.ExcelInfoController{},
  162. &data_manage.PredictEdbClassifyController{},
  163. &data_manage.PredictEdbInfoController{},
  164. &data_manage.BaseFromNationalStatisticsController{},
  165. &data_manage.JiaYueEdbSourceController{},
  166. &data_manage.ChartThemeController{},
  167. &data_manage_permission.DataMangePermissionController{},
  168. &data_manage.BloombergDataController{},
  169. &data_manage.EdbBusinessController{},
  170. ),
  171. ),
  172. web.NSNamespace("/my_chart",
  173. web.NSInclude(
  174. &data_manage.MyChartController{},
  175. ),
  176. ),
  177. web.NSNamespace("/roadshow",
  178. web.NSInclude(
  179. &roadshow.CalendarController{},
  180. ),
  181. ),
  182. web.NSNamespace("/taglib",
  183. web.NSInclude(
  184. &controllers.VarietyTagController{},
  185. ),
  186. ),
  187. web.NSNamespace("/sandbox",
  188. web.NSInclude(
  189. &sandbox.SandboxController{},
  190. ),
  191. ),
  192. web.NSNamespace("/pdfToImg",
  193. web.NSInclude(
  194. &controllers.PdfToImgCommonController{},
  195. ),
  196. ),
  197. web.NSNamespace("/english_report",
  198. web.NSInclude(
  199. &english_report.EnglishReportController{},
  200. &english_report.EnglishPolicyReportController{},
  201. &english_report.EnglishReportEmailController{},
  202. &english_report.EnglishCompanyController{},
  203. &english_report.EnglishCompanyTodoController{},
  204. &english_report.EnglishAuthController{},
  205. &english_report.EnglishReportEmailCallBackController{},
  206. &english_report.EnglishVideoController{},
  207. ),
  208. ),
  209. web.NSNamespace("/report_author",
  210. web.NSInclude(
  211. &controllers.ReportAuthorCommonController{},
  212. ),
  213. web.NSInclude(
  214. &controllers.ReportAuthorController{},
  215. ),
  216. ),
  217. web.NSNamespace("/future_good",
  218. web.NSInclude(
  219. &future_good2.FutureGoodEdbInfoController{},
  220. &future_good2.FutureGoodChartClassifyController{},
  221. &future_good2.FutureGoodChartInfoController{},
  222. ),
  223. ),
  224. web.NSNamespace("/correlation",
  225. web.NSInclude(
  226. &correlation.CorrelationChartClassifyController{},
  227. &correlation.CorrelationChartInfoController{},
  228. ),
  229. ),
  230. web.NSNamespace("/line_equation",
  231. web.NSInclude(
  232. &line_equation.LineEquationChartClassifyController{},
  233. &line_equation.LineEquationChartInfoController{},
  234. ),
  235. ),
  236. web.NSNamespace("/line_feature",
  237. web.NSInclude(
  238. &line_feature.LineFeaturesChartClassifyController{},
  239. &line_feature.LineFeaturesChartInfoController{},
  240. ),
  241. ),
  242. web.NSNamespace("/cloud_disk",
  243. web.NSInclude(
  244. &controllers.CloudDiskController{},
  245. ),
  246. ),
  247. web.NSNamespace("/semantic_analysis",
  248. web.NSInclude(
  249. &semantic_analysis.SaLabelController{},
  250. &semantic_analysis.SaDocClassifyController{},
  251. &semantic_analysis.SaDocController{},
  252. &semantic_analysis.SaCompareClassifyController{},
  253. &semantic_analysis.SaCompareController{},
  254. ),
  255. ),
  256. web.NSNamespace("/supply_analysis",
  257. web.NSInclude(
  258. &supply_analysis.VarietyController{},
  259. ),
  260. ),
  261. web.NSNamespace("/en_permission",
  262. web.NSInclude(
  263. &english_report.EnPermissionController{},
  264. ),
  265. ),
  266. web.NSNamespace("/english_classify",
  267. web.NSInclude(
  268. &english_report.EnglishClassifyController{},
  269. ),
  270. ),
  271. web.NSNamespace("/business_conf",
  272. web.NSInclude(
  273. &controllers.BusinessConfController{},
  274. &controllers.BusinessConfOpenController{},
  275. ),
  276. ),
  277. web.NSNamespace("/trade_analysis",
  278. web.NSInclude(
  279. &trade_analysis.TradeAnalysisController{},
  280. ),
  281. ),
  282. web.NSNamespace("/custom_analysis",
  283. web.NSInclude(
  284. &excel.CustomAnalysisController{},
  285. ),
  286. ),
  287. web.NSNamespace("/out_link",
  288. web.NSInclude(
  289. &controllers.OutLinkController{},
  290. ),
  291. ),
  292. web.NSNamespace("/eta_trial",
  293. web.NSInclude(
  294. &eta_trial.EtaTrialController{},
  295. ),
  296. ),
  297. web.NSNamespace("/user_login",
  298. web.NSInclude(
  299. &controllers.UserLoginController{},
  300. &controllers.UserLoginAuthController{},
  301. ),
  302. ),
  303. web.NSNamespace("/meeting_probabilities",
  304. web.NSInclude(
  305. &controllers.MeetingProbabilitiesController{},
  306. ),
  307. ),
  308. web.NSNamespace("/data_stat/",
  309. web.NSInclude(
  310. &data_stat.EdbSourceStatController{},
  311. &data_stat.EdbTerminalController{},
  312. ),
  313. ),
  314. web.NSNamespace("/chart_framework",
  315. web.NSInclude(
  316. &data_manage.ChartFrameworkController{},
  317. ),
  318. ),
  319. web.NSNamespace("/smart_report",
  320. web.NSInclude(
  321. &smart_report.SmartReportController{},
  322. &smart_report.SmartReportResourceController{},
  323. ),
  324. ),
  325. web.NSNamespace("/ai",
  326. web.NSInclude(
  327. &ai.AiController{},
  328. &ai.AiFileController{},
  329. ),
  330. ),
  331. web.NSNamespace("/cross_variety", //跨品种分析
  332. web.NSInclude(
  333. &cross_variety.ClassifyController{},
  334. &cross_variety.ChartInfoController{},
  335. &cross_variety.VarietyController{},
  336. &cross_variety.TagController{},
  337. ),
  338. ),
  339. web.NSNamespace("/report_approve",
  340. web.NSInclude(
  341. &report_approve.ReportApproveController{},
  342. &report_approve.ReportApproveFlowController{},
  343. ),
  344. ),
  345. web.NSNamespace("/data_source",
  346. web.NSInclude(
  347. &data_source.DataSourceController{},
  348. ),
  349. ),
  350. web.NSNamespace("/permission",
  351. web.NSInclude(
  352. &controllers.ChartPermissionController{},
  353. ),
  354. ),
  355. web.NSNamespace("/speech_recognition",
  356. web.NSInclude(
  357. &speech_recognition.SpeechRecognitionCommonController{},
  358. &speech_recognition.SpeechRecognitionController{},
  359. &speech_recognition.SpeechRecognitionMenuController{},
  360. &speech_recognition.SpeechRecognitionTagController{},
  361. &speech_recognition.SpeechRecognitionTagMenuController{},
  362. ),
  363. ),
  364. web.NSNamespace("/message",
  365. web.NSInclude(
  366. &controllers.MessageController{},
  367. ),
  368. ),
  369. web.NSNamespace("/fe_calendar",
  370. web.NSInclude(
  371. &fe_calendar.FeCalendarMatterController{},
  372. ),
  373. ),
  374. )
  375. web.AddNamespace(ns)
  376. }