router.go 9.9 KB

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