router.go 11 KB

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