router.go 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  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. ),
  145. ),
  146. web.NSNamespace("/datamanage",
  147. web.NSInclude(
  148. &data_manage.EdbInfoController{},
  149. &data_manage.EdbClassifyController{},
  150. &data_manage.ChartClassifyController{},
  151. &data_manage.ChartInfoController{},
  152. &excel.ExcelClassifyController{},
  153. &excel.ExcelInfoController{},
  154. &data_manage.PredictEdbClassifyController{},
  155. &data_manage.PredictEdbInfoController{},
  156. &data_manage.ChartThemeController{},
  157. &data_manage_permission.DataMangePermissionController{},
  158. &data_manage.ManualController{},
  159. ),
  160. ),
  161. web.NSNamespace("/my_chart",
  162. web.NSInclude(
  163. &data_manage.MyChartController{},
  164. ),
  165. ),
  166. web.NSNamespace("/roadshow",
  167. web.NSInclude(
  168. &roadshow.CalendarController{},
  169. ),
  170. ),
  171. web.NSNamespace("/taglib",
  172. web.NSInclude(
  173. &controllers.VarietyTagController{},
  174. ),
  175. ),
  176. web.NSNamespace("/sandbox",
  177. web.NSInclude(
  178. &sandbox.SandboxController{},
  179. ),
  180. ),
  181. web.NSNamespace("/pdfToImg",
  182. web.NSInclude(
  183. &controllers.PdfToImgCommonController{},
  184. ),
  185. ),
  186. web.NSNamespace("/english_report",
  187. web.NSInclude(
  188. &english_report.EnglishReportController{},
  189. &english_report.EnglishReportEmailController{},
  190. &english_report.EnglishCompanyController{},
  191. ),
  192. ),
  193. web.NSNamespace("/future_good",
  194. web.NSInclude(
  195. &future_good2.FutureGoodChartClassifyController{},
  196. &future_good2.FutureGoodChartInfoController{},
  197. ),
  198. ),
  199. web.NSNamespace("/correlation",
  200. web.NSInclude(
  201. &correlation.CorrelationChartClassifyController{},
  202. &correlation.CorrelationChartInfoController{},
  203. ),
  204. ),
  205. web.NSNamespace("/line_equation",
  206. web.NSInclude(
  207. &line_equation.LineEquationChartClassifyController{},
  208. &line_equation.LineEquationChartInfoController{},
  209. ),
  210. ),
  211. web.NSNamespace("/line_feature",
  212. web.NSInclude(
  213. &line_feature.LineFeaturesChartClassifyController{},
  214. &line_feature.LineFeaturesChartInfoController{},
  215. ),
  216. ),
  217. web.NSNamespace("/semantic_analysis",
  218. web.NSInclude(
  219. &semantic_analysis.SaCompareController{},
  220. ),
  221. ),
  222. web.NSNamespace("/supply_analysis",
  223. web.NSInclude(
  224. &supply_analysis.VarietyController{},
  225. ),
  226. ),
  227. web.NSNamespace("/en_permission",
  228. web.NSInclude(
  229. &english_report.EnPermissionController{},
  230. ),
  231. ),
  232. web.NSNamespace("/business_conf",
  233. web.NSInclude(
  234. &controllers.BusinessConfController{},
  235. &controllers.BusinessConfOpenController{},
  236. ),
  237. ),
  238. web.NSNamespace("/trade_analysis",
  239. web.NSInclude(
  240. &trade_analysis.TradeAnalysisController{},
  241. ),
  242. ),
  243. web.NSNamespace("/custom_analysis",
  244. web.NSInclude(
  245. &excel.CustomAnalysisController{},
  246. ),
  247. ),
  248. web.NSNamespace("/eta_trial",
  249. web.NSInclude(
  250. &eta_trial.EtaTrialController{},
  251. ),
  252. ),
  253. web.NSNamespace("/user_login",
  254. web.NSInclude(
  255. &controllers.UserLoginController{},
  256. &controllers.UserLoginAuthController{},
  257. ),
  258. ),
  259. web.NSNamespace("/data_stat/",
  260. web.NSInclude(
  261. &data_stat.EdbSourceStatController{},
  262. &data_stat.EdbTerminalController{},
  263. ),
  264. ),
  265. web.NSNamespace("/smart_report",
  266. web.NSInclude(
  267. &smart_report.SmartReportController{},
  268. &smart_report.SmartReportResourceController{},
  269. ),
  270. ),
  271. web.NSNamespace("/cross_variety", //跨品种分析
  272. web.NSInclude(
  273. &cross_variety.ClassifyController{},
  274. &cross_variety.ChartInfoController{},
  275. &cross_variety.VarietyController{},
  276. &cross_variety.TagController{},
  277. ),
  278. ),
  279. web.NSNamespace("/report_approve",
  280. web.NSInclude(
  281. &report_approve.ReportApproveController{},
  282. &report_approve.ReportApproveFlowController{},
  283. ),
  284. ),
  285. web.NSNamespace("/data_source",
  286. web.NSInclude(
  287. &data_source.DataSourceController{},
  288. ),
  289. ),
  290. web.NSNamespace("/permission",
  291. web.NSInclude(
  292. &controllers.ChartPermissionController{},
  293. ),
  294. ),
  295. web.NSNamespace("/message",
  296. web.NSInclude(
  297. &controllers.MessageController{},
  298. ),
  299. ),
  300. web.NSNamespace("/speech_recognition",
  301. web.NSInclude(
  302. &speech_recognition.SpeechRecognitionCommonController{},
  303. &speech_recognition.SpeechRecognitionController{},
  304. &speech_recognition.SpeechRecognitionMenuController{},
  305. &speech_recognition.SpeechRecognitionTagController{},
  306. &speech_recognition.SpeechRecognitionTagMenuController{},
  307. ),
  308. ),
  309. web.NSNamespace("/range_analysis",
  310. web.NSInclude(
  311. &range_analysis.RangeChartClassifyController{},
  312. &range_analysis.RangeChartChartInfoController{},
  313. ),
  314. ),
  315. web.NSNamespace("/document_manage",
  316. web.NSInclude(
  317. &document_manage.DocumentManageController{},
  318. ),
  319. ),
  320. )
  321. web.AddNamespace(ns)
  322. }