router.go 13 KB

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