router.go 8.6 KB

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