router.go 8.3 KB

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