router.go 9.4 KB

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