router.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  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. ),
  165. ),
  166. web.NSNamespace("/advisory",
  167. web.NSInclude(
  168. &advisory.AdminArticleController{},
  169. &advisory.AdminUserController{},
  170. &advisory.AdminBaseArticleController{},
  171. ),
  172. ),
  173. web.NSNamespace("/datamanage",
  174. web.NSInclude(
  175. &data_manage.EdbInfoController{},
  176. &data_manage.EdbClassifyController{},
  177. &data_manage.ChartClassifyController{},
  178. &data_manage.ChartInfoController{},
  179. &data_manage.ManualController{},
  180. &data_manage.BaseFromChangesVisitorsCovidController{},
  181. &data_manage.ExcelClassifyController{},
  182. &data_manage.ExcelInfoController{},
  183. &data_manage.PredictEdbClassifyController{},
  184. &data_manage.PredictEdbInfoController{},
  185. &data_manage.BaseFromNationalStatisticsController{},
  186. ),
  187. ),
  188. web.NSNamespace("/contract",
  189. web.NSInclude(
  190. &contract.ContractController{},
  191. &contract.ContractApprovalController{},
  192. ),
  193. ),
  194. web.NSNamespace("/group_send_msg",
  195. web.NSInclude(
  196. &controllers.GroupSendMsgController{},
  197. ),
  198. ),
  199. web.NSNamespace("/my_chart",
  200. web.NSInclude(
  201. &data_manage.MyChartController{},
  202. ),
  203. ),
  204. web.NSNamespace("/yb",
  205. web.NSInclude(
  206. &yb.ActivityController{},
  207. &yb.ActivityRegisterController{},
  208. &yb.ApplyRecordController{},
  209. &yb.ChartCensusController{},
  210. &yb.CommunityQuestionController{},
  211. &yb.CommentController{},
  212. &yb.LikeController{},
  213. &yb.CommunityVideoController{},
  214. &yb.PriceDrivenController{},
  215. &yb.VoiceSectionController{},
  216. &yb.VoiceBroadcastController{},
  217. &yb.ProductCensusController{},
  218. &yb.RoadVideoController{},
  219. &yb.ActivitySpeakerController{},
  220. &controllers.DayNewController{},
  221. &yb.ThsSendController{},
  222. &yb.BulletChatController{},
  223. &yb.PdfController{},
  224. ),
  225. ),
  226. web.NSNamespace("/seal",
  227. web.NSInclude(
  228. &seal.SealController{},
  229. &seal.SealApprovalController{},
  230. ),
  231. ),
  232. web.NSNamespace("/roadshow",
  233. web.NSInclude(
  234. &roadshow.CalendarController{},
  235. &roadshow.CalendarMeetingUserController{},
  236. ),
  237. ),
  238. web.NSNamespace("/taglib",
  239. web.NSInclude(
  240. &controllers.VarietyTagController{},
  241. ),
  242. ),
  243. web.NSNamespace("/pdfToImg",
  244. web.NSInclude(
  245. &controllers.PdfToImgCommonController{},
  246. ),
  247. ),
  248. web.NSNamespace("/english_report",
  249. web.NSInclude(
  250. &english_report.EnglishReportController{},
  251. //&english_report.EnglishPolicyReportController{},
  252. &english_report.EnglishReportEmailController{},
  253. &english_report.EnglishCompanyController{},
  254. &english_report.EnglishCompanyTodoController{},
  255. &english_report.EnglishAuthController{},
  256. &english_report.EnglishReportEmailCallBackController{},
  257. &english_report.EnglishVideoController{},
  258. ),
  259. ),
  260. web.NSNamespace("/future_good",
  261. web.NSInclude(
  262. &future_good2.FutureGoodEdbInfoController{},
  263. &future_good2.FutureGoodChartClassifyController{},
  264. &future_good2.FutureGoodChartInfoController{},
  265. ),
  266. ),
  267. web.NSNamespace("/correlation",
  268. web.NSInclude(
  269. &correlation.CorrelationChartClassifyController{},
  270. &correlation.CorrelationChartInfoController{},
  271. ),
  272. ),
  273. web.NSNamespace("/line_equation",
  274. web.NSInclude(
  275. &line_equation.LineEquationChartClassifyController{},
  276. &line_equation.LineEquationChartInfoController{},
  277. ),
  278. ),
  279. web.NSNamespace("/line_feature",
  280. web.NSInclude(
  281. &line_feature.LineFeaturesChartClassifyController{},
  282. &line_feature.LineFeaturesChartInfoController{},
  283. ),
  284. ),
  285. web.NSNamespace("/eta_trial",
  286. web.NSInclude(
  287. &controllers.ETATrialController{},
  288. ),
  289. ),
  290. web.NSNamespace("/business_trip",
  291. web.NSInclude(
  292. &business_trip.BusinessTrip{},
  293. ),
  294. ),
  295. web.NSNamespace("/maycur",
  296. web.NSInclude(
  297. &controllers.MaycurController{},
  298. &controllers.MaycurOpenController{},
  299. ),
  300. ),
  301. web.NSNamespace("/supply_analysis",
  302. web.NSInclude(
  303. &supply_analysis.VarietyController{},
  304. ),
  305. ),
  306. web.NSNamespace("/ai",
  307. web.NSInclude(
  308. &ai.AiController{},
  309. ),
  310. ),
  311. web.NSNamespace("/en_permission",
  312. web.NSInclude(
  313. &english_report.EnPermissionController{},
  314. ),
  315. ),
  316. web.NSNamespace("/eta_business",
  317. web.NSInclude(
  318. &eta_business.EtaBusinessController{},
  319. &eta_business.EtaBusinessMenuController{},
  320. ),
  321. ),
  322. web.NSNamespace("/eta_version_update_log",
  323. web.NSInclude(
  324. &controllers.EtaVersionUpdateLogController{},
  325. ),
  326. ),
  327. web.NSNamespace("/help_doc",
  328. web.NSInclude(
  329. &help_doc.HelpDocClassifyController{},
  330. &help_doc.HelpDocController{},
  331. ),
  332. ),
  333. web.NSNamespace("/user_login",
  334. web.NSInclude(
  335. &controllers.UserLoginController{},
  336. &controllers.UserLoginAuthController{},
  337. ),
  338. ),
  339. web.NSNamespace("/eta_training_video",
  340. web.NSInclude(
  341. &eta_training_video.EtaTrainingVideoController{},
  342. &eta_training_video.EtaTrainingVideoClassifyController{},
  343. &eta_training_video.EtaTrainingVideoTagController{},
  344. ),
  345. ),
  346. web.NSNamespace("/overseas_custom",
  347. web.NSInclude(
  348. &overseas_custom.OverseasCustomController{},
  349. ),
  350. ),
  351. )
  352. web.AddNamespace(ns)
  353. }