router.go 11 KB

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