router.go 11 KB

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