router.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  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. "hongze/hz_crm_api/controllers"
  11. "hongze/hz_crm_api/controllers/advisory"
  12. "hongze/hz_crm_api/controllers/ai"
  13. "hongze/hz_crm_api/controllers/business_trip"
  14. "hongze/hz_crm_api/controllers/contract"
  15. "hongze/hz_crm_api/controllers/cygx"
  16. "hongze/hz_crm_api/controllers/data_manage"
  17. "hongze/hz_crm_api/controllers/data_manage/correlation"
  18. future_good2 "hongze/hz_crm_api/controllers/data_manage/future_good"
  19. "hongze/hz_crm_api/controllers/data_manage/line_equation"
  20. "hongze/hz_crm_api/controllers/data_manage/line_feature"
  21. "hongze/hz_crm_api/controllers/data_manage/supply_analysis"
  22. "hongze/hz_crm_api/controllers/english_report"
  23. "hongze/hz_crm_api/controllers/eta_business"
  24. "hongze/hz_crm_api/controllers/eta_training_video"
  25. "hongze/hz_crm_api/controllers/help_doc"
  26. "hongze/hz_crm_api/controllers/overseas_custom"
  27. "hongze/hz_crm_api/controllers/roadshow"
  28. "hongze/hz_crm_api/controllers/seal"
  29. "hongze/hz_crm_api/controllers/yb"
  30. "github.com/beego/beego/v2/server/web"
  31. "github.com/beego/beego/v2/server/web/filter/cors"
  32. )
  33. func init() {
  34. //解决跨域问题
  35. web.InsertFilter("*", web.BeforeRouter, cors.Allow(&cors.Options{
  36. AllowAllOrigins: true,
  37. AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
  38. AllowHeaders: []string{"Origin", "Authorization", "Uuid", "Accesstoken", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
  39. ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
  40. AllowCredentials: true,
  41. }))
  42. ns := web.NewNamespace("/adminapi",
  43. web.NSNamespace("/sysuser",
  44. web.NSInclude(
  45. &controllers.SysUserController{},
  46. &controllers.SysUserAuthController{},
  47. ),
  48. ),
  49. web.NSNamespace("/classify",
  50. web.NSInclude(
  51. &controllers.ClassifyController{},
  52. ),
  53. ),
  54. web.NSNamespace("/banner",
  55. web.NSInclude(
  56. &controllers.BannerController{},
  57. ),
  58. ),
  59. web.NSNamespace("/report",
  60. web.NSInclude(
  61. &controllers.ReportController{},
  62. &controllers.ReportUploadCommonController{},
  63. &controllers.ReportChapterTypeController{},
  64. ),
  65. ),
  66. web.NSNamespace("/statistic_report",
  67. web.NSInclude(
  68. &controllers.StatisticReportController{},
  69. &controllers.StatisticYbLogController{},
  70. &controllers.StatisticReportCommonController{},
  71. &controllers.StatisticCompanyMergerController{},
  72. ),
  73. ),
  74. web.NSNamespace("/voice",
  75. web.NSInclude(
  76. &controllers.VoiceController{},
  77. &controllers.VoiceCommonController{},
  78. ),
  79. ),
  80. web.NSNamespace("/system",
  81. web.NSInclude(
  82. &controllers.SysDepartmentController{},
  83. &controllers.SysGroupController{},
  84. &controllers.SysTeamController{},
  85. &controllers.SysAdminController{},
  86. &controllers.SysRoleController{},
  87. &controllers.SysRoleAdminController{},
  88. &controllers.SysMenuController{},
  89. &controllers.SysMenuButtonController{},
  90. &controllers.SysFlowController{},
  91. &controllers.ResearchGroupController{},
  92. ),
  93. ),
  94. web.NSNamespace("/custom",
  95. web.NSInclude(
  96. &controllers.CompanyController{},
  97. &controllers.WxUserController{},
  98. &controllers.CompanyApprovalMessageController{},
  99. &controllers.CompanyIndustryController{},
  100. &controllers.CompanyPermissionController{},
  101. &controllers.CompanyUserController{},
  102. &controllers.CompanySellerController{},
  103. &controllers.CompanyProcessController{},
  104. &controllers.CompanyApplyController{},
  105. &controllers.CompanyApprovalController{},
  106. &controllers.OfficialUserController{},
  107. &controllers.CompanyTodoController{},
  108. &controllers.CompanyReceiveController{},
  109. &controllers.CompanyServiceRecordController{},
  110. &controllers.FullCompanyController{},
  111. &controllers.CompanyRenewalController{},
  112. ),
  113. ),
  114. web.NSNamespace("/resource",
  115. web.NSInclude(
  116. &controllers.ResourceController{},
  117. ),
  118. ),
  119. web.NSNamespace("/video",
  120. web.NSInclude(
  121. &controllers.VideoController{},
  122. ),
  123. ),
  124. web.NSNamespace("/cygx",
  125. web.NSInclude(
  126. &cygx.AdviceController{},
  127. &cygx.InterviewApplyController{},
  128. &cygx.IndustryMapController{},
  129. &cygx.ApplyRecordController{},
  130. &cygx.IndustrialManagementController{},
  131. &cygx.IndustrialAnalystController{},
  132. &cygx.IndustrialSubjectController{},
  133. &cygx.ReportArticleController{},
  134. &cygx.SearchKeywordController{},
  135. &cygx.SummaryManage{},
  136. &cygx.ActivityCoAntroller{},
  137. &cygx.ActivityTypeCoAntroller{},
  138. &cygx.ActivitySignupCoAntroller{},
  139. &cygx.ActivityMeetCoAntroller{},
  140. &cygx.ResearchSummaryController{},
  141. &cygx.RoadshowEssenceController{},
  142. &cygx.MinutesSummaryController{},
  143. &cygx.ReportSelectionController{},
  144. &cygx.ActivitySpecialCoAntroller{},
  145. &cygx.UserController{},
  146. &cygx.ActivityLossCoAntroller{},
  147. &cygx.MicroRoadshowController{},
  148. &cygx.ActivityVideoCoAntroller{},
  149. &cygx.ActivitySpecialTripCoAntroller{},
  150. &cygx.MorningMeetingController{},
  151. &cygx.TacticsTimeLineController{},
  152. &cygx.ProductInteriorController{},
  153. &cygx.BannerCoAntroller{},
  154. &cygx.TagManagementController{},
  155. &cygx.YanxuanSpecialController{},
  156. &cygx.ContractAllocationController{},
  157. &cygx.QuestionnaireController{},
  158. &cygx.AskserieVideoController{},
  159. &cygx.UserAdminShareHistoryController{},
  160. &cygx.EnterScoreController{},
  161. &cygx.OrderController{},
  162. &cygx.RaiServeCoAntroller{},
  163. &cygx.UserFeedbackController{},
  164. &cygx.GushouTimeLineController{},
  165. ),
  166. ),
  167. web.NSNamespace("/advisory",
  168. web.NSInclude(
  169. &advisory.AdminArticleController{},
  170. &advisory.AdminUserController{},
  171. &advisory.AdminBaseArticleController{},
  172. ),
  173. ),
  174. web.NSNamespace("/datamanage",
  175. web.NSInclude(
  176. &data_manage.EdbInfoController{},
  177. &data_manage.EdbClassifyController{},
  178. &data_manage.ChartClassifyController{},
  179. &data_manage.ChartInfoController{},
  180. &data_manage.ManualController{},
  181. &data_manage.BaseFromChangesVisitorsCovidController{},
  182. &data_manage.ExcelClassifyController{},
  183. &data_manage.ExcelInfoController{},
  184. &data_manage.PredictEdbClassifyController{},
  185. &data_manage.PredictEdbInfoController{},
  186. &data_manage.BaseFromNationalStatisticsController{},
  187. ),
  188. ),
  189. web.NSNamespace("/contract",
  190. web.NSInclude(
  191. &contract.ContractController{},
  192. &contract.ContractApprovalController{},
  193. ),
  194. ),
  195. web.NSNamespace("/group_send_msg",
  196. web.NSInclude(
  197. &controllers.GroupSendMsgController{},
  198. ),
  199. ),
  200. web.NSNamespace("/my_chart",
  201. web.NSInclude(
  202. &data_manage.MyChartController{},
  203. ),
  204. ),
  205. web.NSNamespace("/yb",
  206. web.NSInclude(
  207. &yb.ActivityController{},
  208. &yb.ActivityRegisterController{},
  209. &yb.ApplyRecordController{},
  210. &yb.ChartCensusController{},
  211. &yb.CommunityQuestionController{},
  212. &yb.CommentController{},
  213. &yb.LikeController{},
  214. &yb.CommunityVideoController{},
  215. &yb.PriceDrivenController{},
  216. &yb.VoiceSectionController{},
  217. &yb.VoiceBroadcastController{},
  218. &yb.ProductCensusController{},
  219. &yb.RoadVideoController{},
  220. &yb.ActivitySpeakerController{},
  221. &controllers.DayNewController{},
  222. &yb.ThsSendController{},
  223. &yb.BulletChatController{},
  224. &yb.PdfController{},
  225. ),
  226. ),
  227. web.NSNamespace("/seal",
  228. web.NSInclude(
  229. &seal.SealController{},
  230. &seal.SealApprovalController{},
  231. ),
  232. ),
  233. web.NSNamespace("/roadshow",
  234. web.NSInclude(
  235. &roadshow.CalendarController{},
  236. &roadshow.CalendarMeetingUserController{},
  237. ),
  238. ),
  239. web.NSNamespace("/taglib",
  240. web.NSInclude(
  241. &controllers.VarietyTagController{},
  242. ),
  243. ),
  244. web.NSNamespace("/pdfToImg",
  245. web.NSInclude(
  246. &controllers.PdfToImgCommonController{},
  247. ),
  248. ),
  249. web.NSNamespace("/english_report",
  250. web.NSInclude(
  251. &english_report.EnglishReportController{},
  252. //&english_report.EnglishPolicyReportController{},
  253. &english_report.EnglishReportEmailController{},
  254. &english_report.EnglishCompanyController{},
  255. &english_report.EnglishCompanyTodoController{},
  256. &english_report.EnglishAuthController{},
  257. &english_report.EnglishReportEmailCallBackController{},
  258. &english_report.EnglishVideoController{},
  259. ),
  260. ),
  261. web.NSNamespace("/future_good",
  262. web.NSInclude(
  263. &future_good2.FutureGoodEdbInfoController{},
  264. &future_good2.FutureGoodChartClassifyController{},
  265. &future_good2.FutureGoodChartInfoController{},
  266. ),
  267. ),
  268. web.NSNamespace("/correlation",
  269. web.NSInclude(
  270. &correlation.CorrelationChartClassifyController{},
  271. &correlation.CorrelationChartInfoController{},
  272. ),
  273. ),
  274. web.NSNamespace("/line_equation",
  275. web.NSInclude(
  276. &line_equation.LineEquationChartClassifyController{},
  277. &line_equation.LineEquationChartInfoController{},
  278. ),
  279. ),
  280. web.NSNamespace("/line_feature",
  281. web.NSInclude(
  282. &line_feature.LineFeaturesChartClassifyController{},
  283. &line_feature.LineFeaturesChartInfoController{},
  284. ),
  285. ),
  286. web.NSNamespace("/eta_trial",
  287. web.NSInclude(
  288. &controllers.ETATrialController{},
  289. ),
  290. ),
  291. web.NSNamespace("/business_trip",
  292. web.NSInclude(
  293. &business_trip.BusinessTrip{},
  294. ),
  295. ),
  296. web.NSNamespace("/maycur",
  297. web.NSInclude(
  298. &controllers.MaycurController{},
  299. &controllers.MaycurOpenController{},
  300. ),
  301. ),
  302. web.NSNamespace("/supply_analysis",
  303. web.NSInclude(
  304. &supply_analysis.VarietyController{},
  305. ),
  306. ),
  307. web.NSNamespace("/ai",
  308. web.NSInclude(
  309. &ai.AiController{},
  310. ),
  311. ),
  312. web.NSNamespace("/en_permission",
  313. web.NSInclude(
  314. &english_report.EnPermissionController{},
  315. ),
  316. ),
  317. web.NSNamespace("/eta_business",
  318. web.NSInclude(
  319. &eta_business.EtaBusinessController{},
  320. &eta_business.EtaBusinessMenuController{},
  321. ),
  322. ),
  323. web.NSNamespace("/eta_version_update_log",
  324. web.NSInclude(
  325. &controllers.EtaVersionUpdateLogController{},
  326. ),
  327. ),
  328. web.NSNamespace("/help_doc",
  329. web.NSInclude(
  330. &help_doc.HelpDocClassifyController{},
  331. &help_doc.HelpDocController{},
  332. ),
  333. ),
  334. web.NSNamespace("/user_login",
  335. web.NSInclude(
  336. &controllers.UserLoginController{},
  337. &controllers.UserLoginAuthController{},
  338. ),
  339. ),
  340. web.NSNamespace("/eta_training_video",
  341. web.NSInclude(
  342. &eta_training_video.EtaTrainingVideoController{},
  343. &eta_training_video.EtaTrainingVideoClassifyController{},
  344. &eta_training_video.EtaTrainingVideoTagController{},
  345. ),
  346. ),
  347. web.NSNamespace("/overseas_custom",
  348. web.NSInclude(
  349. &overseas_custom.OverseasCustomController{},
  350. ),
  351. ),
  352. )
  353. web.AddNamespace(ns)
  354. }