router.go 13 KB

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