router.go 13 KB

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