router.go 10 KB

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