router.go 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  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_manage_permission"
  17. "eta_gn/eta_api/controllers/data_manage/excel"
  18. future_good2 "eta_gn/eta_api/controllers/data_manage/future_good"
  19. "eta_gn/eta_api/controllers/data_manage/line_equation"
  20. "eta_gn/eta_api/controllers/data_manage/line_feature"
  21. "eta_gn/eta_api/controllers/data_manage/range_analysis"
  22. "eta_gn/eta_api/controllers/data_manage/supply_analysis"
  23. "eta_gn/eta_api/controllers/data_stat"
  24. "eta_gn/eta_api/controllers/fe_calendar"
  25. "eta_gn/eta_api/controllers/knowledge"
  26. "eta_gn/eta_api/controllers/knowledge_approve"
  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. ),
  161. ),
  162. web.NSNamespace("/my_chart",
  163. web.NSInclude(
  164. &data_manage.MyChartController{},
  165. ),
  166. ),
  167. web.NSNamespace("/taglib",
  168. web.NSInclude(
  169. &controllers.VarietyTagController{},
  170. ),
  171. ),
  172. web.NSNamespace("/sandbox",
  173. web.NSInclude(
  174. &sandbox.SandboxController{},
  175. ),
  176. ),
  177. web.NSNamespace("/pdfToImg",
  178. web.NSInclude(
  179. &controllers.PdfToImgCommonController{},
  180. ),
  181. ),
  182. web.NSNamespace("/report_author",
  183. web.NSInclude(
  184. &controllers.ReportAuthorCommonController{},
  185. ),
  186. web.NSInclude(
  187. &controllers.ReportAuthorController{},
  188. ),
  189. ),
  190. web.NSNamespace("/future_good",
  191. web.NSInclude(
  192. &future_good2.FutureGoodEdbInfoController{},
  193. &future_good2.FutureGoodChartClassifyController{},
  194. &future_good2.FutureGoodChartInfoController{},
  195. ),
  196. ),
  197. web.NSNamespace("/correlation",
  198. web.NSInclude(
  199. &correlation.CorrelationChartClassifyController{},
  200. &correlation.CorrelationChartInfoController{},
  201. ),
  202. ),
  203. web.NSNamespace("/line_equation",
  204. web.NSInclude(
  205. &line_equation.LineEquationChartClassifyController{},
  206. &line_equation.LineEquationChartInfoController{},
  207. ),
  208. ),
  209. web.NSNamespace("/line_feature",
  210. web.NSInclude(
  211. &line_feature.LineFeaturesChartClassifyController{},
  212. &line_feature.LineFeaturesChartInfoController{},
  213. ),
  214. ),
  215. web.NSNamespace("/semantic_analysis",
  216. web.NSInclude(
  217. &semantic_analysis.SaLabelController{},
  218. &semantic_analysis.SaDocClassifyController{},
  219. &semantic_analysis.SaDocController{},
  220. &semantic_analysis.SaCompareClassifyController{},
  221. &semantic_analysis.SaCompareController{},
  222. ),
  223. ),
  224. web.NSNamespace("/supply_analysis",
  225. web.NSInclude(
  226. &supply_analysis.VarietyController{},
  227. ),
  228. ),
  229. web.NSNamespace("/business_conf",
  230. web.NSInclude(
  231. &controllers.BusinessConfController{},
  232. &controllers.BusinessConfOpenController{},
  233. ),
  234. ),
  235. web.NSNamespace("/trade_analysis",
  236. web.NSInclude(
  237. &trade_analysis.TradeAnalysisController{},
  238. ),
  239. ),
  240. web.NSNamespace("/custom_analysis",
  241. web.NSInclude(
  242. &excel.CustomAnalysisController{},
  243. ),
  244. ),
  245. web.NSNamespace("/out_link",
  246. web.NSInclude(
  247. &controllers.OutLinkController{},
  248. ),
  249. ),
  250. web.NSNamespace("/user_login",
  251. web.NSInclude(
  252. &controllers.UserLoginController{},
  253. &controllers.UserLoginAuthController{},
  254. ),
  255. ),
  256. web.NSNamespace("/meeting_probabilities",
  257. web.NSInclude(
  258. &controllers.MeetingProbabilitiesController{},
  259. ),
  260. ),
  261. web.NSNamespace("/data_stat/",
  262. web.NSInclude(
  263. &data_stat.EdbTerminalController{},
  264. ),
  265. ),
  266. web.NSNamespace("/chart_framework",
  267. web.NSInclude(
  268. &data_manage.ChartFrameworkController{},
  269. ),
  270. ),
  271. web.NSNamespace("/smart_report",
  272. web.NSInclude(
  273. &smart_report.SmartReportResourceController{},
  274. ),
  275. ),
  276. web.NSNamespace("/ai",
  277. web.NSInclude(
  278. &ai.AiController{},
  279. &ai.AiFileController{},
  280. ),
  281. ),
  282. web.NSNamespace("/cross_variety", //跨品种分析
  283. web.NSInclude(
  284. &cross_variety.ClassifyController{},
  285. &cross_variety.ChartInfoController{},
  286. &cross_variety.VarietyController{},
  287. &cross_variety.TagController{},
  288. ),
  289. ),
  290. web.NSNamespace("/report_approve",
  291. web.NSInclude(
  292. &report_approve.ReportApproveController{},
  293. &report_approve.ReportApproveFlowController{},
  294. ),
  295. ),
  296. web.NSNamespace("/bi_approve",
  297. web.NSInclude(
  298. &biapprove.BiApproveFlowController{},
  299. &biapprove.BiApproveController{},
  300. ),
  301. ),
  302. web.NSNamespace("/permission",
  303. web.NSInclude(
  304. &controllers.ChartPermissionController{},
  305. ),
  306. ),
  307. web.NSNamespace("/speech_recognition",
  308. web.NSInclude(
  309. &speech_recognition.SpeechRecognitionCommonController{},
  310. &speech_recognition.SpeechRecognitionController{},
  311. &speech_recognition.SpeechRecognitionMenuController{},
  312. &speech_recognition.SpeechRecognitionTagController{},
  313. &speech_recognition.SpeechRecognitionTagMenuController{},
  314. ),
  315. ),
  316. web.NSNamespace("/message",
  317. web.NSInclude(
  318. &controllers.MessageController{},
  319. ),
  320. ),
  321. web.NSNamespace("/fe_calendar",
  322. web.NSInclude(
  323. &fe_calendar.FeCalendarMatterController{},
  324. ),
  325. ),
  326. web.NSNamespace("/range_analysis",
  327. web.NSInclude(
  328. &range_analysis.RangeChartClassifyController{},
  329. &range_analysis.RangeChartChartInfoController{},
  330. ),
  331. ),
  332. web.NSNamespace("/knowledge",
  333. web.NSInclude(
  334. &knowledge.ClassifyController{},
  335. &knowledge.ResourceController{},
  336. &knowledge.TagController{},
  337. ),
  338. ),
  339. web.NSNamespace("/bi_dashborad",
  340. web.NSInclude(
  341. &controllers.BIDaShboardController{},
  342. ),
  343. ),
  344. web.NSNamespace("/report_history",
  345. web.NSInclude(
  346. &controllers.ReportHistoryController{},
  347. ),
  348. ),
  349. web.NSNamespace("/ppt_history",
  350. web.NSInclude(
  351. &controllers.PptV2HistoryController{},
  352. ),
  353. ),
  354. web.NSNamespace("/image_conf",
  355. web.NSInclude(
  356. &controllers.ImageConfController{},
  357. ),
  358. ),
  359. web.NSNamespace("/knowledge_approve",
  360. web.NSInclude(
  361. &knowledge_approve.KnowledgeApproveController{},
  362. &knowledge_approve.KnowledgeApproveFlowController{},
  363. ),
  364. ),
  365. )
  366. web.AddNamespace(ns)
  367. }