router.go 13 KB

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