蛋蛋星球 后台端
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.
 
 
 
 

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