蛋蛋星球 后台端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

453 lines
19 KiB

  1. package router
  2. import (
  3. "applet/app/cfg"
  4. "applet/app/hdl"
  5. "applet/app/hdl/advertising"
  6. "applet/app/hdl/article"
  7. "applet/app/hdl/cloud_bundle"
  8. "applet/app/hdl/comm"
  9. "applet/app/hdl/content_reward"
  10. "applet/app/hdl/financial_center"
  11. "applet/app/hdl/friend_circle"
  12. "applet/app/hdl/im"
  13. "applet/app/hdl/institutional_management/egg_energy"
  14. "applet/app/hdl/institutional_management/egg_point_coefficient"
  15. "applet/app/hdl/institutional_management/module_setting"
  16. "applet/app/hdl/institutional_management/public_platoon"
  17. "applet/app/hdl/marketing_applications/new_user_red_package"
  18. "applet/app/hdl/member_center"
  19. "applet/app/hdl/notice"
  20. "applet/app/hdl/setCenter/oss/aliyun"
  21. "applet/app/hdl/setCenter/web"
  22. "applet/app/hdl/user_feedback"
  23. "applet/app/hdl/user_real_name"
  24. "applet/app/hdl/website"
  25. "applet/app/mw"
  26. _ "applet/docs"
  27. "github.com/gin-gonic/gin"
  28. swaggerFiles "github.com/swaggo/files"
  29. ginSwagger "github.com/swaggo/gin-swagger"
  30. )
  31. // 初始化路由
  32. func Init() *gin.Engine {
  33. // debug, release, test 项目阶段
  34. mode := "release"
  35. if cfg.Debug {
  36. mode = "debug"
  37. }
  38. gin.SetMode(mode)
  39. //创建一个新的启动器
  40. r := gin.New()
  41. r.GET("/api/swagger/*any", func(c *gin.Context) {
  42. // r.Use(mw.SwagAuth())
  43. ginSwagger.DisablingWrapHandler(swaggerFiles.Handler, "SWAGGER")(c)
  44. })
  45. // 是否打印访问日志, 在非正式环境都打印
  46. if mode != "release" {
  47. r.Use(gin.Logger())
  48. }
  49. r.Use(gin.Recovery())
  50. r.GET("/favicon.ico", func(c *gin.Context) {
  51. c.Status(204)
  52. })
  53. r.NoRoute(func(c *gin.Context) {
  54. c.JSON(404, gin.H{"code": 404, "msg": "page not found", "data": []struct{}{}})
  55. })
  56. r.NoMethod(func(c *gin.Context) {
  57. c.JSON(405, gin.H{"code": 405, "msg": "method not allowed", "data": []struct{}{}})
  58. })
  59. r.Use(mw.Cors)
  60. route(r.Group("/api"))
  61. return r
  62. }
  63. func route(r *gin.RouterGroup) {
  64. r.GET("/test", hdl.Demo)
  65. r.POST("/login", hdl.Login)
  66. {
  67. //打包机调用,不需要校验
  68. r.GET("/cloudBundle/base", cloud_bundle.Base) //打包基本信息
  69. r.POST("/cloudBundle/update/state", cloud_bundle.UpdateState) //打包更新状态
  70. r.POST("/cloudBundle/upload", cloud_bundle.Upload) //打包 上传apk
  71. r.GET("/getSTSVoucher", comm.GetSTSVoucher) // 获取 STS 凭证
  72. //这里是官网的接口
  73. rWebsite := r.Group("/website") //官网信息
  74. {
  75. rWebsite.GET("/info", website.WebsiteInfo) // 官网
  76. rWebsite.GET("/getModuleSetting", website.GetModuleSetting) // 获取页面样式
  77. rWebsite.POST("/certificate", website.Certificate) // 查询证书
  78. }
  79. }
  80. r.Use(mw.Auth) // 以下接口需要JWT验证
  81. rComm(r.Group("/comm"))
  82. r.GET("/config", hdl.Config)
  83. rIm(r.Group("/im"))
  84. r.Use(mw.CheckPermission) // 检测权限
  85. rRole(r.Group("/role"))
  86. rInstitutionalManagement(r.Group("/institutionalManagement"))
  87. rMarketingApplications(r.Group("/marketingApplications"))
  88. rMemberCenter(r.Group("/memberCenter"))
  89. rHomePage(r.Group("/homePage"))
  90. rSettCenter(r.Group("/settCenter"))
  91. rFinancialCenter(r.Group("/financialCenter"))
  92. rAdvertising(r.Group("/advertising"))
  93. rNotice(r.Group("/notice"))
  94. rArticle(r.Group("/article"))
  95. rUserFeedback(r.Group("/userFeedback"))
  96. rCloudBundle(r.Group("/cloudBundle")) //云打包
  97. rUserRealName(r.Group("/userRealName")) //实名认证
  98. rFriendCircleSettings(r.Group("/friendCircleSettings")) // 朋友圈设置
  99. rAdminLog(r.Group("/adminLog")) // 操作日志
  100. }
  101. func rSettCenter(r *gin.RouterGroup) { //设置中心
  102. rOss := r.Group("/oss") //oss设置
  103. {
  104. rOssAliYun := rOss.Group("/aliYun") //阿里云
  105. {
  106. rOssAliYun.GET("/getBasic", aliyun.GetBasic)
  107. rOssAliYun.POST("/setBasic", aliyun.SetBasic)
  108. }
  109. }
  110. rWeb := r.Group("/web") //网站信息
  111. {
  112. rWeb.GET("/getBasic", web.GetBasic)
  113. rWeb.POST("/setBasic", web.SetBasic)
  114. }
  115. }
  116. func rHomePage(r *gin.RouterGroup) {
  117. r.GET("/totalData", hdl.GetTotalData)
  118. r.GET("/activeData", hdl.GetActiveData)
  119. r.GET("/growData", hdl.GetGrowData)
  120. }
  121. func rAdvertising(r *gin.RouterGroup) {
  122. r.GET("/getBasic", advertising.GetBasic)
  123. r.POST("/setBasic", advertising.SetBasic)
  124. r.GET("/getPlayletBasic", advertising.GetPlayletBasic)
  125. r.POST("/setPlayletBasic", advertising.SetPlayletBasic)
  126. r.POST("/list", advertising.List)
  127. r.POST("/save", advertising.Save)
  128. r.POST("/del", advertising.Del)
  129. r.GET("/getLimit", advertising.GetLimit)
  130. r.POST("/setLimit", advertising.SetLimit)
  131. r.POST("/function/list", advertising.FunctionList)
  132. r.POST("/function/save", advertising.FunctionSave)
  133. r.POST("/function/del", advertising.FunctionDel)
  134. r.POST("/visit/list", advertising.VisitList)
  135. }
  136. func rNotice(r *gin.RouterGroup) {
  137. rBase := r.Group("/base") //极光
  138. {
  139. rBase.POST("/list", notice.List)
  140. rBase.POST("/save", notice.Save)
  141. rBase.POST("/del", notice.Del)
  142. }
  143. rJpush := r.Group("/jPush") //极光
  144. {
  145. rJpush.POST("/push/list", notice.PushList)
  146. rJpush.POST("/getUserList", notice.JPushGetUserList)
  147. rJpush.GET("/getTagList", notice.JPushGetTagList)
  148. rJpush.GET("/getLevelList", notice.JPushGetLevelList)
  149. rJpush.POST("/push/save", notice.PushSave)
  150. }
  151. rAliyunSms := r.Group("/aliyunSms") //阿里云短信
  152. {
  153. rAliyunSms.POST("/file/phone", notice.AliyunSmsFilePhone)
  154. rAliyunSms.POST("/getUserList", notice.AliyunSmsGetUserList)
  155. rAliyunSms.GET("/getTagList", notice.AliyunSmsTagList)
  156. rAliyunSms.GET("/getLevelList", notice.AliyunSmsGetLevelList)
  157. rAliyunSms.GET("/sale/base", notice.AliyunSmsSaleBase)
  158. rAliyunSms.POST("/sale/save", notice.AliyunSmsSaleSave)
  159. rAliyunSms.POST("/push/list", notice.AliyunSmsPushList)
  160. rAliyunSms.POST("/push/save", notice.AliyunSmsPushSave)
  161. }
  162. }
  163. func rArticle(r *gin.RouterGroup) { //文章
  164. rCate := r.Group("/cate") //
  165. {
  166. rCate.POST("/list", article.CateList)
  167. rCate.POST("/save", article.CateSave)
  168. rCate.POST("/del", article.CateDel)
  169. }
  170. rContent := r.Group("/content") //
  171. {
  172. rContent.POST("/list", article.List)
  173. rContent.POST("/save", article.Save)
  174. rContent.POST("/del", article.Del)
  175. }
  176. }
  177. func rUserFeedback(r *gin.RouterGroup) { //用户反馈
  178. rCate := r.Group("/cate") //
  179. {
  180. rCate.POST("/list", user_feedback.CateList)
  181. rCate.POST("/save", user_feedback.CateSave)
  182. rCate.POST("/del", user_feedback.CateDel)
  183. }
  184. rContent := r.Group("/content") //
  185. {
  186. rContent.POST("/list", user_feedback.List)
  187. rContent.POST("/record/list", user_feedback.RecordList)
  188. rContent.POST("/say", user_feedback.Say)
  189. rContent.POST("/change/state", user_feedback.ChangeState)
  190. rContent.POST("/del", user_feedback.Del)
  191. }
  192. }
  193. func rCloudBundle(r *gin.RouterGroup) { //云打包
  194. r.POST("/list", cloud_bundle.List)
  195. r.POST("/build", cloud_bundle.Build)
  196. r.POST("/del", cloud_bundle.Del)
  197. r.POST("/audit/set", cloud_bundle.AuditSet)
  198. r.POST("/audit/clear", cloud_bundle.AuditClear)
  199. r.GET("/img/base", cloud_bundle.ImgBase)
  200. r.POST("/img/base/save", cloud_bundle.ImgBaseSave)
  201. r.GET("/version/base", cloud_bundle.VersionBase)
  202. r.POST("/version/base/save", cloud_bundle.VersionBaseSave)
  203. }
  204. func rUserRealName(r *gin.RouterGroup) { //实名认证
  205. r.POST("/list", user_real_name.List)
  206. r.POST("/save", user_real_name.Save)
  207. r.GET("/base", user_real_name.Base)
  208. r.POST("/base/save", user_real_name.BaseSave)
  209. }
  210. func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理
  211. rPublicPlatoon := r.Group("/publicPlatoon") //公排设置
  212. {
  213. rPublicPlatoon.GET("/getBasic", public_platoon.GetPublicPlatoonBasic)
  214. rPublicPlatoon.PUT("/updateBasic", public_platoon.UpdatePublicPlatoonBasic)
  215. rPublicPlatoon.GET("/relationshipMap", public_platoon.GetRelationshipMap)
  216. rPublicPlatoon.GET("/findUserRelationshipMap", public_platoon.FindUserRelationshipMap)
  217. rPublicPlatoon.GET("/findSubUserRelationshipMap", public_platoon.FindSubUserRelationshipMap)
  218. rPublicPlatoon.POST("/exchangeUserPosition", public_platoon.ExchangeUserPosition)
  219. rPublicPlatoon.POST("/selectMember", public_platoon.SelectMember)
  220. rPublicPlatoonUserFreePunish := rPublicPlatoon.Group("/publicPlatoonUserFreePunish")
  221. {
  222. rPublicPlatoonUserFreePunish.POST("/index", public_platoon.GetFreePublishUser)
  223. rPublicPlatoonUserFreePunish.POST("/save", public_platoon.AddFreePublishUser)
  224. rPublicPlatoonUserFreePunish.DELETE("/delete", public_platoon.DeleteFreePublishUser)
  225. }
  226. rCommunityDividends := rPublicPlatoon.Group("/communityDividends")
  227. {
  228. rCommunityDividends.POST("/communityDividendsList", public_platoon.ListCommunityDividends)
  229. rCommunityDividends.POST("/communityDividendsAdd", public_platoon.AddCommunityDividends)
  230. rCommunityDividends.POST("/communityDividendsWithUserList", public_platoon.ListCommunityDividendsWithUser)
  231. rCommunityDividends.POST("/communityDividendsWithUserAdd", public_platoon.AddCommunityDividendsWithUser)
  232. rCommunityDividends.DELETE("/communityDividendsWithUserDel/:id", public_platoon.DelCommunityDividendsWithUser)
  233. }
  234. rUserDailyActivityAnalysis := rPublicPlatoon.Group("/userDailyActivityAnalysis")
  235. {
  236. rUserDailyActivityAnalysis.POST("/index", public_platoon.UserDailyActivityAnalysis)
  237. }
  238. }
  239. rEggEnergy := r.Group("/eggEnergy") //蛋蛋能量
  240. {
  241. rEggEnergy.GET("/getVirtualCoinList", egg_energy.GetVirtualCoinList)
  242. rEggEnergy.POST("/batchAddVirtualCoins", egg_energy.BatchAddVirtualCoins)
  243. rEggEnergy.POST("/updateVirtualCoin", egg_energy.UpdateVirtualCoin)
  244. rEggEnergy.DELETE("/deleteVirtualCoin/:id", egg_energy.DeleteVirtualCoin)
  245. rEggEnergy.GET("/getBasic", egg_energy.GetEggEnergyBasic)
  246. rEggEnergy.POST("/updateBasic", egg_energy.UpdateEggEnergyBasic)
  247. rEggEnergy.GET("/getVipSetting", egg_energy.GetEggEnergyVipSetting)
  248. rEggEnergy.POST("/addVipSetting", egg_energy.AddEggEnergyVipSetting)
  249. rEggEnergy.POST("/updateVipSetting", egg_energy.UpdateEggEnergyVipSetting)
  250. rEggEnergy.GET("/coreData", egg_energy.GetEggEnergyCoreData)
  251. rEggEnergy.POST("/coreData", egg_energy.UpdateEggEnergyCoreData)
  252. rEggEnergyUserCoin := rEggEnergy.Group("/userCoin")
  253. {
  254. rEggEnergyUserCoin.POST("/eggEnergyUserCoinList", egg_energy.GetEggEnergyUserCoinList)
  255. rEggEnergyUserCoin.POST("/eggEnergyUserCoinFlowList", egg_energy.GetEggEnergyUserCoinFlowList)
  256. rEggEnergyUserCoin.POST("/eggPointsUserCoinList", egg_energy.GetEggPointsUserCoinList)
  257. rEggEnergyUserCoin.POST("/getEggPointsUserCoinFlowList", egg_energy.GetEggPointsUserCoinFlowList)
  258. }
  259. rEggEnergyAvailableEnergy := rEggEnergy.Group("/availableEnergy")
  260. {
  261. rEggEnergyAvailableEnergy.POST("/list", egg_energy.DynamicDataFlowList)
  262. }
  263. rEggGlobalData := rEggEnergy.Group("/globalData")
  264. {
  265. rEggGlobalData.GET("/coreDataList", egg_energy.GetEggCoreDataList)
  266. rEggGlobalData.GET("/pointsCenterPriceCurve", egg_energy.GetPriceCurve)
  267. rEggGlobalData.POST("/fundDataList", egg_energy.GetFundDataList)
  268. rEggGlobalData.POST("/fundDataRecordList", egg_energy.GetFundDataRecordList)
  269. rEggGlobalData.POST("/fundDataAdd", egg_energy.AddFundData)
  270. }
  271. rPlatformRevenue := rEggEnergy.Group("/platformRevenue")
  272. {
  273. rPlatformRevenue.POST("/getVideoReward", egg_energy.GetVideoReward)
  274. rPlatformRevenue.POST("/setVideoReward", egg_energy.SetVideoReward)
  275. rPlatformRevenue.POST("/platformRevenueList", egg_energy.ListPlatformRevenue)
  276. rPlatformRevenue.POST("/platformRevenueAdd", egg_energy.AddPlatformRevenue)
  277. }
  278. rEggPoint := rEggEnergy.Group("/eggPoint")
  279. {
  280. rEggPoint.POST("/userEggIndex", egg_energy.UserEggIndex)
  281. rEggPoint.POST("/statisticsUserEggIndex", egg_energy.StatisticsUserEggIndex)
  282. rEggPoint.POST("/userEggFlow", egg_energy.UserEggFlow)
  283. rEggPoint.POST("/manualScore", egg_energy.ManualScore)
  284. }
  285. rContributionValue := rEggEnergy.Group("/contributionValue")
  286. {
  287. rContributionValue.GET("/basic", egg_energy.GetContributionValueBasicSetting)
  288. rContributionValue.POST("/updateBasic", egg_energy.UpdateContributionValueBasicSetting)
  289. }
  290. }
  291. rModuleSetting := r.Group("/moduleSetting")
  292. {
  293. rModuleSetting.GET("/getModuleSetting", module_setting.ModuleSettingGet)
  294. rModuleSetting.POST("/getArticle", article.List)
  295. rModuleSetting.POST("/updateModuleSetting", module_setting.ModuleSettingUpdate)
  296. }
  297. rContentReward := r.Group("/contentReward") // 内容奖励
  298. {
  299. rVideo := rContentReward.Group("/video")
  300. {
  301. rVideo.GET("/base", content_reward.VideoBase) //
  302. rVideo.POST("/save", content_reward.VideoBaseSave) //
  303. }
  304. rPlaylet := rContentReward.Group("/playlet")
  305. {
  306. rPlaylet.GET("/base", content_reward.PlayletBase) //
  307. rPlaylet.POST("/save", content_reward.PlayletBaseSave) //
  308. }
  309. }
  310. rEggPointCoefficient := r.Group("/eggPointCoefficient") // 蛋蛋分区间系数管理
  311. {
  312. rEggPointCoefficient.GET("/index", egg_point_coefficient.EggPointCoefficientGet) // 查询
  313. rEggPointCoefficient.POST("/add", egg_point_coefficient.EggPointCoefficientBatchAdd) // 新增
  314. rEggPointCoefficient.POST("/update", egg_point_coefficient.EggPointCoefficientUpdate) // 更新
  315. rEggPointCoefficient.DELETE("/del", egg_point_coefficient.EggPointCoefficientDel) // 删除
  316. }
  317. }
  318. func rMarketingApplications(r *gin.RouterGroup) { //营销应用
  319. rNewUserRedPackage := r.Group("/newUserRedPackage") //新人红包
  320. {
  321. rNewUserRedPackage.GET("/getBasic", new_user_red_package.NewUserRedPackageGetBasic)
  322. rNewUserRedPackage.PUT("/updateBasic", new_user_red_package.NewUserRedPackageUpdateBasic)
  323. rNewUserRedPackage.POST("/recordList", new_user_red_package.NewUserRedPackageRecordList)
  324. rNewUserRedPackage.POST("/recordFlowList", new_user_red_package.NewUserRedPackageRecordFlowList)
  325. }
  326. }
  327. func rMemberCenter(r *gin.RouterGroup) { // 会员中心
  328. rUserManagement := r.Group("/userManagement")
  329. {
  330. rUserManagement.POST("/getUserList", member_center.UserManagementGetUserList)
  331. rUserManagement.GET("/userData", member_center.UserManagementGetOneBasic)
  332. rUserManagement.POST("/updateUserInfo", member_center.UserManagementUpdateUserInfo)
  333. rUserManagement.POST("/userRecycle", member_center.UserManagementUserRecycle)
  334. rUserManagement.POST("/userRecycleCancel", member_center.UserManagementUserRecycleCancel)
  335. rUserManagement.POST("/userRecycleList", member_center.UserManagementGetUserRecycleList)
  336. rUserManagement.POST("/userDelete", member_center.UserManagementUserDelete)
  337. rUserManagement.GET("/getFans", member_center.UserManagementGetFans)
  338. rUserManagement.GET("/balanceDetail", member_center.UserManagementGetBalanceDetail)
  339. rUserManagement.GET("/getVirtualCoinDetail", member_center.UserManagementGetVirtualCoinDetail)
  340. }
  341. rTagManagement := r.Group("/tagManagement")
  342. {
  343. rTagManagement.GET("/getTagList", member_center.GetTagList)
  344. rTagManagement.POST("/addTag", member_center.AddTag)
  345. rTagManagement.POST("/updateTag", member_center.UpdateTag)
  346. rTagManagement.DELETE("/deleteTag", member_center.DeleteTag)
  347. }
  348. rLevelManagement := r.Group("/levelManagement")
  349. {
  350. rLevelManagement.GET("/getLevelList", member_center.GetLevelList)
  351. rLevelManagement.GET("/getOneLevel", member_center.GetOneLevel)
  352. rLevelManagement.POST("/updateLevel", member_center.UpdateLevel)
  353. rLevelManagement.POST("/addLevel", member_center.AddLevel)
  354. rLevelManagement.DELETE("/deleteLevel", member_center.DeleteLevel)
  355. rLevelManagement.DELETE("/deleteLevelTask", member_center.DeleteLevelTask)
  356. }
  357. rCertificate := r.Group("/certificate")
  358. {
  359. rCertificate.POST("/list", member_center.CertificateList)
  360. rCertificate.POST("/save", member_center.CertificateSave)
  361. rCertificate.POST("/del", member_center.CertificateDel)
  362. }
  363. }
  364. func rIm(r *gin.RouterGroup) {
  365. r.GET("/getBasic", im.GetBasic)
  366. r.POST("/setBasic", im.SetBasic)
  367. r.POST("/pageEmoticon", im.PageEmoticon)
  368. r.POST("/addEmoticon", im.AddEmoticon)
  369. r.POST("/setEmoticonState", im.SetEmoticonState)
  370. r.POST("/updateEmoticon", im.UpdateEmoticon)
  371. r.POST("/deleteEmoticon", im.DeleteEmoticon)
  372. r.POST("/pageCustomerService", im.PageCustomerService)
  373. r.POST("/addCustomerService", im.AddCustomerService)
  374. r.POST("/setCustomerServiceState", im.SetCustomerServiceState)
  375. r.POST("/updateCustomerServiceMemo", im.UpdateCustomerServiceMemo)
  376. r.GET("/redPackageRecordsDetail", im.RedPackageRecordsDetail)
  377. r.POST("/pageSendRedPackageOrd", im.PageSendRedPackageOrd)
  378. r.POST("/groupList", im.GroupList)
  379. r.POST("/groupUserList", im.GroupUserList)
  380. r.POST("/batchSendGroupMessage", im.BatchSendGroupMessage)
  381. r.POST("/batchSendUserMessage", im.BatchSendUserMessage)
  382. }
  383. func rFinancialCenter(r *gin.RouterGroup) {
  384. rWithdraw := r.Group("/withdraw")
  385. {
  386. rWithdraw.GET("/setting", financial_center.GetWithdrawSetting)
  387. rWithdraw.POST("/updateWithdrawSetting", financial_center.UpdateWithdrawSetting)
  388. rWithdraw.POST("/applyList", financial_center.GetWithdrawApplyList)
  389. rWithdraw.POST("/audit", financial_center.WithdrawApplyAudit)
  390. }
  391. }
  392. func rFriendCircleSettings(r *gin.RouterGroup) {
  393. rBasic := r.Group("/basic")
  394. {
  395. rBasic.GET("/index", friend_circle.GetFriendCircleBasicSettings) // 获取动态基础设置
  396. rBasic.POST("/save", friend_circle.UpdateFriendCircleBasicSettings) // 更新动态设置
  397. }
  398. rBlackList := r.Group("/blackList")
  399. {
  400. rBlackList.GET("/index", friend_circle.GetBlackList) // 获取黑名单
  401. rBlackList.POST("/add", friend_circle.AddBlackList) // 添加黑名单
  402. rBlackList.DELETE("/del", friend_circle.DeleteBlackList) // 删除黑名单
  403. }
  404. rDynamic := r.Group("/dynamic")
  405. {
  406. rDynamic.POST("/index", friend_circle.GetDynamic) // 获取动态列表
  407. rDynamic.POST("/update", friend_circle.UpdateDynamic) // 更新动态
  408. rDynamic.DELETE("/del", friend_circle.DeleteDynamic) // 删除动态
  409. rDynamic.POST("/release", friend_circle.ReleaseDynamic) // 发布动态
  410. }
  411. }
  412. func rRole(r *gin.RouterGroup) {
  413. r.GET("/roleList", hdl.RoleList) // 角色列表
  414. r.POST("/addRole", hdl.AddRole) // 角色添加
  415. r.POST("/roleBindPermissionGroup", hdl.RoleBindPermissionGroup) // 角色绑定权限组
  416. r.POST("/updateRoleState", hdl.UpdateRoleState) // 修改角色状态
  417. r.POST("/updateRole", hdl.UpdateRole) // 修改角色状态
  418. r.DELETE("/deleteRole/:id", hdl.DeleteRole) // 删除角色
  419. r.GET("/permissionGroupList", hdl.PermissionGroupList) // 权限组列表
  420. r.POST("/adminList", hdl.AdminList) // 管理员列表
  421. r.POST("/updateAdminState", hdl.UpdateAdminState) // 修改管理员状态
  422. r.POST("/updateAdmin", hdl.UpdateAdmin) // 修改管理员信息
  423. r.POST("/addAdmin", hdl.AddAdmin) // 新增管理员
  424. r.DELETE("/deleteAdmin/:adm_id", hdl.DeleteAdmin) // 删除管理员
  425. r.GET("/adminInfo", hdl.AdminInfo) // 获取管理员信息
  426. r.POST("/bindAdminRole", hdl.BindAdminRole) // 绑定角色
  427. }
  428. func rAdminLog(r *gin.RouterGroup) {
  429. r.POST("/list", hdl.AdminLog) //
  430. }
  431. func rComm(r *gin.RouterGroup) {
  432. r.POST("/getMenuList", comm.MenuList) // 获取菜单栏列表
  433. r.POST("/getOssUrl", comm.GetOssUrl) // 获取阿里云上传PutObject所需的签名URL
  434. r.GET("/getSTSVoucher", comm.GetSTSVoucher) // 获取 STS 凭证
  435. r.GET("/adminInfo", comm.GetAdminInfo)
  436. }