router.go 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. package routers
  2. import (
  3. "eta_gn/eta_api/controllers"
  4. "eta_gn/eta_api/controllers/ai"
  5. biapprove "eta_gn/eta_api/controllers/bi_approve"
  6. "eta_gn/eta_api/controllers/data_manage"
  7. "eta_gn/eta_api/controllers/data_manage/correlation"
  8. "eta_gn/eta_api/controllers/data_manage/cross_variety"
  9. "eta_gn/eta_api/controllers/data_manage/data_manage_permission"
  10. "eta_gn/eta_api/controllers/data_manage/excel"
  11. future_good2 "eta_gn/eta_api/controllers/data_manage/future_good"
  12. "eta_gn/eta_api/controllers/data_manage/line_equation"
  13. "eta_gn/eta_api/controllers/data_manage/line_feature"
  14. "eta_gn/eta_api/controllers/data_manage/range_analysis"
  15. "eta_gn/eta_api/controllers/data_manage/supply_analysis"
  16. "eta_gn/eta_api/controllers/data_stat"
  17. "eta_gn/eta_api/controllers/fe_calendar"
  18. "eta_gn/eta_api/controllers/knowledge"
  19. "eta_gn/eta_api/controllers/report_approve"
  20. "eta_gn/eta_api/controllers/sandbox"
  21. "eta_gn/eta_api/controllers/semantic_analysis"
  22. "eta_gn/eta_api/controllers/smart_report"
  23. "eta_gn/eta_api/controllers/speech_recognition"
  24. "eta_gn/eta_api/controllers/trade_analysis"
  25. "github.com/beego/beego/v2/server/web"
  26. "github.com/beego/beego/v2/server/web/filter/cors"
  27. )
  28. func init() {
  29. web.InsertFilter("*", web.BeforeRouter, cors.Allow(&cors.Options{
  30. AllowAllOrigins: true,
  31. AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
  32. AllowHeaders: []string{"Origin", "Authorization", "Uuid", "Accesstoken", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
  33. ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
  34. AllowCredentials: true,
  35. }))
  36. ns := web.NewNamespace("/adminapi",
  37. web.NSNamespace("/sysuser",
  38. web.NSInclude(
  39. &controllers.SysUserController{},
  40. ),
  41. web.NSInclude(
  42. &controllers.SysUserAuthController{},
  43. ),
  44. ),
  45. web.NSNamespace("/classify",
  46. web.NSInclude(
  47. &controllers.ClassifyController{},
  48. ),
  49. ),
  50. web.NSNamespace("/banner",
  51. web.NSInclude(
  52. &controllers.BannerController{},
  53. ),
  54. ),
  55. web.NSNamespace("/report",
  56. web.NSInclude(
  57. &controllers.ReportController{},
  58. &controllers.ReportChapterTypeController{},
  59. ),
  60. web.NSInclude(
  61. &controllers.ReportCommonController{},
  62. ),
  63. web.NSInclude(
  64. &controllers.ReportUploadCommonController{},
  65. ),
  66. ),
  67. web.NSNamespace("/voice",
  68. web.NSInclude(
  69. &controllers.VoiceController{},
  70. ),
  71. web.NSInclude(
  72. &controllers.VoiceCommonController{},
  73. ),
  74. ),
  75. web.NSNamespace("/pptv2",
  76. web.NSInclude(
  77. &controllers.PptV2Controller{},
  78. &controllers.PptV2GroupController{},
  79. ),
  80. web.NSInclude(
  81. &controllers.PptV2CommonController{},
  82. ),
  83. ),
  84. web.NSNamespace("/entry",
  85. web.NSInclude(
  86. &controllers.TargetController{},
  87. &data_manage.ManualEdbController{},
  88. ),
  89. web.NSInclude(
  90. &controllers.TargetCommonController{},
  91. ),
  92. ),
  93. web.NSNamespace("/system",
  94. web.NSInclude(
  95. &controllers.SysDepartmentController{},
  96. ),
  97. web.NSInclude(
  98. &controllers.SysGroupController{},
  99. ),
  100. web.NSInclude(
  101. &controllers.SysTeamController{},
  102. ),
  103. web.NSInclude(
  104. &controllers.SysAdminController{},
  105. ),
  106. web.NSInclude(
  107. &controllers.SysRoleController{},
  108. &controllers.SysRoleAdminController{},
  109. ),
  110. web.NSInclude(
  111. &controllers.SysMenuController{},
  112. ),
  113. web.NSInclude(
  114. &controllers.SysMenuButtonController{},
  115. ),
  116. web.NSInclude(
  117. &controllers.ResearchGroupController{},
  118. ),
  119. ),
  120. web.NSNamespace("/custom",
  121. web.NSInclude(
  122. &controllers.CompanySellerController{},
  123. &controllers.CompanyPermissionController{},
  124. ),
  125. ),
  126. web.NSNamespace("/resource",
  127. web.NSInclude(
  128. &controllers.ResourceController{},
  129. &controllers.ResourceAuthController{},
  130. ),
  131. ),
  132. web.NSNamespace("/datamanage",
  133. web.NSInclude(
  134. &data_manage.EdbInfoController{},
  135. &data_manage.EdbClassifyController{},
  136. &data_manage.ChartClassifyController{},
  137. &data_manage.ChartInfoController{},
  138. &data_manage.ManualController{},
  139. &excel.ExcelClassifyController{},
  140. &excel.ExcelInfoController{},
  141. &data_manage.PredictEdbClassifyController{},
  142. &data_manage.PredictEdbInfoController{},
  143. &data_manage.ChartThemeController{},
  144. &data_manage_permission.DataMangePermissionController{},
  145. &data_manage.BloombergDataController{},
  146. &data_manage.EdbBusinessController{},
  147. &data_manage.EdbInfoRelationController{},
  148. &data_manage.FactorEdbSeriesController{},
  149. &data_manage.EdbCollectController{},
  150. &data_manage.EdbCollectClassifyController{},
  151. ),
  152. ),
  153. web.NSNamespace("/my_chart",
  154. web.NSInclude(
  155. &data_manage.MyChartController{},
  156. ),
  157. ),
  158. web.NSNamespace("/taglib",
  159. web.NSInclude(
  160. &controllers.VarietyTagController{},
  161. ),
  162. ),
  163. web.NSNamespace("/sandbox",
  164. web.NSInclude(
  165. &sandbox.SandboxController{},
  166. ),
  167. ),
  168. web.NSNamespace("/pdfToImg",
  169. web.NSInclude(
  170. &controllers.PdfToImgCommonController{},
  171. ),
  172. ),
  173. web.NSNamespace("/report_author",
  174. web.NSInclude(
  175. &controllers.ReportAuthorCommonController{},
  176. ),
  177. web.NSInclude(
  178. &controllers.ReportAuthorController{},
  179. ),
  180. ),
  181. web.NSNamespace("/future_good",
  182. web.NSInclude(
  183. &future_good2.FutureGoodEdbInfoController{},
  184. &future_good2.FutureGoodChartClassifyController{},
  185. &future_good2.FutureGoodChartInfoController{},
  186. ),
  187. ),
  188. web.NSNamespace("/correlation",
  189. web.NSInclude(
  190. &correlation.CorrelationChartClassifyController{},
  191. &correlation.CorrelationChartInfoController{},
  192. ),
  193. ),
  194. web.NSNamespace("/line_equation",
  195. web.NSInclude(
  196. &line_equation.LineEquationChartClassifyController{},
  197. &line_equation.LineEquationChartInfoController{},
  198. ),
  199. ),
  200. web.NSNamespace("/line_feature",
  201. web.NSInclude(
  202. &line_feature.LineFeaturesChartClassifyController{},
  203. &line_feature.LineFeaturesChartInfoController{},
  204. ),
  205. ),
  206. web.NSNamespace("/semantic_analysis",
  207. web.NSInclude(
  208. &semantic_analysis.SaLabelController{},
  209. &semantic_analysis.SaDocClassifyController{},
  210. &semantic_analysis.SaDocController{},
  211. &semantic_analysis.SaCompareClassifyController{},
  212. &semantic_analysis.SaCompareController{},
  213. ),
  214. ),
  215. web.NSNamespace("/supply_analysis",
  216. web.NSInclude(
  217. &supply_analysis.VarietyController{},
  218. ),
  219. ),
  220. web.NSNamespace("/business_conf",
  221. web.NSInclude(
  222. &controllers.BusinessConfController{},
  223. &controllers.BusinessConfOpenController{},
  224. ),
  225. ),
  226. web.NSNamespace("/trade_analysis",
  227. web.NSInclude(
  228. &trade_analysis.TradeAnalysisController{},
  229. ),
  230. ),
  231. web.NSNamespace("/custom_analysis",
  232. web.NSInclude(
  233. &excel.CustomAnalysisController{},
  234. ),
  235. ),
  236. web.NSNamespace("/out_link",
  237. web.NSInclude(
  238. &controllers.OutLinkController{},
  239. ),
  240. ),
  241. web.NSNamespace("/user_login",
  242. web.NSInclude(
  243. &controllers.UserLoginController{},
  244. &controllers.UserLoginAuthController{},
  245. ),
  246. ),
  247. web.NSNamespace("/meeting_probabilities",
  248. web.NSInclude(
  249. &controllers.MeetingProbabilitiesController{},
  250. ),
  251. ),
  252. web.NSNamespace("/data_stat/",
  253. web.NSInclude(
  254. &data_stat.EdbTerminalController{},
  255. ),
  256. ),
  257. web.NSNamespace("/chart_framework",
  258. web.NSInclude(
  259. &data_manage.ChartFrameworkController{},
  260. ),
  261. ),
  262. web.NSNamespace("/smart_report",
  263. web.NSInclude(
  264. &smart_report.SmartReportResourceController{},
  265. ),
  266. ),
  267. web.NSNamespace("/ai",
  268. web.NSInclude(
  269. &ai.AiController{},
  270. &ai.AiFileController{},
  271. ),
  272. ),
  273. web.NSNamespace("/cross_variety", //跨品种分析
  274. web.NSInclude(
  275. &cross_variety.ClassifyController{},
  276. &cross_variety.ChartInfoController{},
  277. &cross_variety.VarietyController{},
  278. &cross_variety.TagController{},
  279. ),
  280. ),
  281. web.NSNamespace("/report_approve",
  282. web.NSInclude(
  283. &report_approve.ReportApproveController{},
  284. &report_approve.ReportApproveFlowController{},
  285. ),
  286. ),
  287. web.NSNamespace("/bi_approve",
  288. web.NSInclude(
  289. &biapprove.BiApproveFlowController{},
  290. &biapprove.BiApproveController{},
  291. ),
  292. ),
  293. web.NSNamespace("/permission",
  294. web.NSInclude(
  295. &controllers.ChartPermissionController{},
  296. ),
  297. ),
  298. web.NSNamespace("/speech_recognition",
  299. web.NSInclude(
  300. &speech_recognition.SpeechRecognitionCommonController{},
  301. &speech_recognition.SpeechRecognitionController{},
  302. &speech_recognition.SpeechRecognitionMenuController{},
  303. &speech_recognition.SpeechRecognitionTagController{},
  304. &speech_recognition.SpeechRecognitionTagMenuController{},
  305. ),
  306. ),
  307. web.NSNamespace("/message",
  308. web.NSInclude(
  309. &controllers.MessageController{},
  310. ),
  311. ),
  312. web.NSNamespace("/fe_calendar",
  313. web.NSInclude(
  314. &fe_calendar.FeCalendarMatterController{},
  315. ),
  316. ),
  317. web.NSNamespace("/range_analysis",
  318. web.NSInclude(
  319. &range_analysis.RangeChartClassifyController{},
  320. &range_analysis.RangeChartChartInfoController{},
  321. ),
  322. ),
  323. web.NSNamespace("/knowledge",
  324. web.NSInclude(
  325. &knowledge.ClassifyController{},
  326. &knowledge.ResourceController{},
  327. &knowledge.TagController{},
  328. ),
  329. ),
  330. web.NSNamespace("/bi_dashborad",
  331. web.NSInclude(
  332. &controllers.BIDaShboardController{},
  333. ),
  334. ),
  335. )
  336. web.AddNamespace(ns)
  337. }