router.go 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  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/eta_mobile/controllers"
  11. "eta/eta_mobile/controllers/data_manage"
  12. "eta/eta_mobile/controllers/data_manage/correlation"
  13. "eta/eta_mobile/controllers/data_manage/cross_variety"
  14. "eta/eta_mobile/controllers/data_manage/data_manage_permission"
  15. "eta/eta_mobile/controllers/data_manage/excel"
  16. future_good2 "eta/eta_mobile/controllers/data_manage/future_good"
  17. "eta/eta_mobile/controllers/data_manage/line_equation"
  18. "eta/eta_mobile/controllers/data_manage/line_feature"
  19. "eta/eta_mobile/controllers/data_manage/range_analysis"
  20. "eta/eta_mobile/controllers/data_manage/supply_analysis"
  21. "eta/eta_mobile/controllers/data_source"
  22. "eta/eta_mobile/controllers/data_stat"
  23. "eta/eta_mobile/controllers/document_manage"
  24. "eta/eta_mobile/controllers/english_report"
  25. "eta/eta_mobile/controllers/eta_forum"
  26. "eta/eta_mobile/controllers/eta_trial"
  27. "eta/eta_mobile/controllers/report_approve"
  28. "eta/eta_mobile/controllers/roadshow"
  29. "eta/eta_mobile/controllers/sandbox"
  30. "eta/eta_mobile/controllers/semantic_analysis"
  31. "eta/eta_mobile/controllers/smart_report"
  32. "eta/eta_mobile/controllers/speech_recognition"
  33. "eta/eta_mobile/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("/v1",
  47. web.NSNamespace("/ppt",
  48. web.NSInclude(
  49. &controllers.PptController{},
  50. ),
  51. web.NSInclude(
  52. &controllers.PptCommonController{},
  53. ),
  54. ),
  55. web.NSNamespace("/sysuser",
  56. web.NSInclude(
  57. &controllers.SysUserController{},
  58. ),
  59. web.NSInclude(
  60. &controllers.SysUserAuthController{},
  61. ),
  62. ),
  63. web.NSNamespace("/classify",
  64. web.NSInclude(
  65. &controllers.ClassifyController{},
  66. ),
  67. ),
  68. web.NSNamespace("/banner",
  69. web.NSInclude(
  70. &controllers.BannerController{},
  71. ),
  72. ),
  73. web.NSNamespace("/report",
  74. web.NSInclude(
  75. &controllers.ReportController{},
  76. &controllers.ReportChapterTypeController{},
  77. ),
  78. web.NSInclude(
  79. &controllers.ReportCommonController{},
  80. ),
  81. web.NSInclude(
  82. &controllers.ReportUploadCommonController{},
  83. ),
  84. ),
  85. web.NSNamespace("/voice",
  86. web.NSInclude(
  87. &controllers.VoiceController{},
  88. ),
  89. web.NSInclude(
  90. &controllers.VoiceCommonController{},
  91. ),
  92. ),
  93. web.NSNamespace("/pptv2",
  94. web.NSInclude(
  95. &controllers.PptV2Controller{},
  96. &controllers.PptV2GroupController{},
  97. ),
  98. web.NSInclude(
  99. &controllers.PptV2CommonController{},
  100. ),
  101. ),
  102. web.NSNamespace("/ppt_english",
  103. web.NSInclude(
  104. &controllers.PptEnglishController{},
  105. &controllers.PptEnglishGroupController{},
  106. ),
  107. web.NSInclude(
  108. &controllers.PptEnglishCommonController{},
  109. ),
  110. ),
  111. web.NSNamespace("/entry",
  112. web.NSInclude(
  113. &controllers.TargetController{},
  114. ),
  115. web.NSInclude(
  116. &controllers.TargetCommonController{},
  117. ),
  118. web.NSInclude(
  119. &controllers.TradeCommonController{},
  120. ),
  121. ),
  122. web.NSNamespace("/system",
  123. web.NSInclude(
  124. &controllers.SysDepartmentController{},
  125. ),
  126. web.NSInclude(
  127. &controllers.SysAdminController{},
  128. ),
  129. web.NSInclude(
  130. &controllers.SysRoleController{},
  131. ),
  132. web.NSInclude(
  133. &controllers.SysMenuController{},
  134. ),
  135. ),
  136. web.NSNamespace("/custom",
  137. web.NSInclude(
  138. &controllers.CompanySellerController{},
  139. &controllers.CompanyPermissionController{},
  140. ),
  141. ),
  142. web.NSNamespace("/resource",
  143. web.NSInclude(
  144. &controllers.ResourceController{},
  145. &controllers.ResourceAuthController{},
  146. ),
  147. ),
  148. web.NSNamespace("/datamanage",
  149. web.NSInclude(
  150. &data_manage.EdbInfoController{},
  151. &data_manage.EdbClassifyController{},
  152. &data_manage.ChartClassifyController{},
  153. &data_manage.ChartInfoController{},
  154. &excel.ExcelClassifyController{},
  155. &excel.ExcelInfoController{},
  156. &data_manage.PredictEdbClassifyController{},
  157. &data_manage.PredictEdbInfoController{},
  158. &data_manage.ChartThemeController{},
  159. &data_manage_permission.DataMangePermissionController{},
  160. &data_manage.ManualController{},
  161. ),
  162. ),
  163. web.NSNamespace("/my_chart",
  164. web.NSInclude(
  165. &data_manage.MyChartController{},
  166. ),
  167. ),
  168. web.NSNamespace("/roadshow",
  169. web.NSInclude(
  170. &roadshow.CalendarController{},
  171. ),
  172. ),
  173. web.NSNamespace("/taglib",
  174. web.NSInclude(
  175. &controllers.VarietyTagController{},
  176. ),
  177. ),
  178. web.NSNamespace("/sandbox",
  179. web.NSInclude(
  180. &sandbox.SandboxController{},
  181. ),
  182. ),
  183. web.NSNamespace("/pdfToImg",
  184. web.NSInclude(
  185. &controllers.PdfToImgCommonController{},
  186. ),
  187. ),
  188. web.NSNamespace("/english_report",
  189. web.NSInclude(
  190. &english_report.EnglishReportController{},
  191. &english_report.EnglishReportEmailController{},
  192. &english_report.EnglishCompanyController{},
  193. ),
  194. ),
  195. web.NSNamespace("/future_good",
  196. web.NSInclude(
  197. &future_good2.FutureGoodChartClassifyController{},
  198. &future_good2.FutureGoodChartInfoController{},
  199. ),
  200. ),
  201. web.NSNamespace("/correlation",
  202. web.NSInclude(
  203. &correlation.CorrelationChartClassifyController{},
  204. &correlation.CorrelationChartInfoController{},
  205. ),
  206. ),
  207. web.NSNamespace("/line_equation",
  208. web.NSInclude(
  209. &line_equation.LineEquationChartClassifyController{},
  210. &line_equation.LineEquationChartInfoController{},
  211. ),
  212. ),
  213. web.NSNamespace("/line_feature",
  214. web.NSInclude(
  215. &line_feature.LineFeaturesChartClassifyController{},
  216. &line_feature.LineFeaturesChartInfoController{},
  217. ),
  218. ),
  219. web.NSNamespace("/semantic_analysis",
  220. web.NSInclude(
  221. &semantic_analysis.SaCompareController{},
  222. ),
  223. ),
  224. web.NSNamespace("/supply_analysis",
  225. web.NSInclude(
  226. &supply_analysis.VarietyController{},
  227. ),
  228. ),
  229. web.NSNamespace("/en_permission",
  230. web.NSInclude(
  231. &english_report.EnPermissionController{},
  232. ),
  233. ),
  234. web.NSNamespace("/business_conf",
  235. web.NSInclude(
  236. &controllers.BusinessConfController{},
  237. &controllers.BusinessConfOpenController{},
  238. ),
  239. ),
  240. web.NSNamespace("/trade_analysis",
  241. web.NSInclude(
  242. &trade_analysis.TradeAnalysisController{},
  243. ),
  244. ),
  245. web.NSNamespace("/custom_analysis",
  246. web.NSInclude(
  247. &excel.CustomAnalysisController{},
  248. ),
  249. ),
  250. web.NSNamespace("/eta_trial",
  251. web.NSInclude(
  252. &eta_trial.EtaTrialController{},
  253. ),
  254. ),
  255. web.NSNamespace("/user_login",
  256. web.NSInclude(
  257. &controllers.UserLoginController{},
  258. &controllers.UserLoginAuthController{},
  259. ),
  260. ),
  261. web.NSNamespace("/data_stat/",
  262. web.NSInclude(
  263. &data_stat.EdbSourceStatController{},
  264. &data_stat.EdbTerminalController{},
  265. ),
  266. ),
  267. web.NSNamespace("/smart_report",
  268. web.NSInclude(
  269. &smart_report.SmartReportController{},
  270. &smart_report.SmartReportResourceController{},
  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("/data_source",
  288. web.NSInclude(
  289. &data_source.DataSourceController{},
  290. ),
  291. ),
  292. web.NSNamespace("/permission",
  293. web.NSInclude(
  294. &controllers.ChartPermissionController{},
  295. ),
  296. ),
  297. web.NSNamespace("/message",
  298. web.NSInclude(
  299. &controllers.MessageController{},
  300. ),
  301. ),
  302. web.NSNamespace("/speech_recognition",
  303. web.NSInclude(
  304. &speech_recognition.SpeechRecognitionCommonController{},
  305. &speech_recognition.SpeechRecognitionController{},
  306. &speech_recognition.SpeechRecognitionMenuController{},
  307. &speech_recognition.SpeechRecognitionTagController{},
  308. &speech_recognition.SpeechRecognitionTagMenuController{},
  309. ),
  310. ),
  311. web.NSNamespace("/range_analysis",
  312. web.NSInclude(
  313. &range_analysis.RangeChartClassifyController{},
  314. &range_analysis.RangeChartChartInfoController{},
  315. ),
  316. ),
  317. web.NSNamespace("/document_manage",
  318. web.NSInclude(
  319. &document_manage.DocumentManageController{},
  320. ),
  321. ),
  322. web.NSNamespace("/eta_forum",
  323. web.NSInclude(
  324. &eta_forum.EtaForumController{},
  325. ),
  326. ),
  327. )
  328. web.AddNamespace(ns)
  329. }