forked from all_user/stat_center
Initial commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"stat/api/activityApi"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func activityRouter(router *gin.RouterGroup) {
|
||||
group := router.Group("/activity")
|
||||
{ // 活动
|
||||
group.GET("/list", activityApi.ActivityList)
|
||||
group.POST("/add", activityApi.AddActivity)
|
||||
group.POST("/update", activityApi.ActUpdate)
|
||||
group.POST("/del", activityApi.DelOneAct)
|
||||
// 活动抽奖码
|
||||
group.GET("/lotterycode/list", activityApi.LotteryCodeList)
|
||||
group.POST("/lotterycode/gen", activityApi.GenLotCode)
|
||||
group.POST("/lotterycode/update", activityApi.UpdateLotCode)
|
||||
group.POST("/lotterycode/del", activityApi.DelLotCode)
|
||||
// 活动奖品
|
||||
group.GET("/gift/list", activityApi.LotteryGiftList)
|
||||
group.POST("/gift/add", activityApi.AddLotGift)
|
||||
group.POST("/gift/update", activityApi.UpdateLotGift)
|
||||
group.POST("/gift/del", activityApi.DelLotGift)
|
||||
// 抽奖兑换详情
|
||||
group.GET("/getgift/list", activityApi.ReceiveGiftInfoList)
|
||||
group.POST("/getgift/gen", activityApi.GenGiftCode)
|
||||
group.POST("/getgift/update", activityApi.UpdateRecvGiftInfo)
|
||||
group.POST("/getgift/del", activityApi.DelReceiveGiftInfo)
|
||||
// h5页面
|
||||
group.POST("/h5/info", activityApi.ActivityInfo)
|
||||
group.POST("/h5/giftinfo", activityApi.ActivityGiftInfo)
|
||||
group.POST("/h5/draw", activityApi.LuckyDraw)
|
||||
// 活动访问量
|
||||
group.POST("/visit", activityApi.ActivityVisitCount)
|
||||
group.GET("/visit/list", activityApi.ActivityVisitCountList)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"stat/api/adminApi"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func adminRouter(router *gin.RouterGroup) {
|
||||
group := router.Group("/admin")
|
||||
{
|
||||
group.POST("/login", adminApi.AdminLogin)
|
||||
group.POST("/verify", adminApi.AdminVerify)
|
||||
group.POST("/list", adminApi.AdminList)
|
||||
group.POST("/add", adminApi.AddAdmin)
|
||||
group.POST("/update", adminApi.UpdateAdmin)
|
||||
group.DELETE("/del", adminApi.DelAdmin)
|
||||
}
|
||||
adminbloc := router.Group("/adminbloc")
|
||||
{
|
||||
adminbloc.POST("/login", adminApi.AdminLoginBloc)
|
||||
adminbloc.POST("/list", adminApi.AdminListBloc)
|
||||
adminbloc.POST("/add", adminApi.AddAdminBloc)
|
||||
adminbloc.POST("/update", adminApi.UpdateAdminBloc)
|
||||
adminbloc.DELETE("/del", adminApi.DelAdminBloc)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"stat/api/advertiseApi"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func adsRouter(router *gin.RouterGroup) {
|
||||
// 广告
|
||||
ads := router.Group("/ads")
|
||||
{
|
||||
ads.POST("/list", advertiseApi.ListAds)
|
||||
ads.POST("/add", advertiseApi.AddAds)
|
||||
ads.POST("/update", advertiseApi.UpdateAds)
|
||||
ads.POST("/del", advertiseApi.DelAds)
|
||||
// 外部获取广告
|
||||
ads.POST("/get", advertiseApi.GetAds)
|
||||
// 广告点击
|
||||
ads.POST("/click", advertiseApi.ClickAds)
|
||||
// 广告统计
|
||||
ads.POST("/stat", advertiseApi.GetAdvertiseStat)
|
||||
// 广告统计
|
||||
ads.POST("/stattotal", advertiseApi.GetAdvertiseTotalStat)
|
||||
}
|
||||
|
||||
// 广告位置
|
||||
adsLoc := router.Group("/adsLoc")
|
||||
{
|
||||
adsLoc.POST("/list", advertiseApi.ListAdsLoc)
|
||||
adsLoc.POST("/add", advertiseApi.AddAdsLoc)
|
||||
adsLoc.POST("/update", advertiseApi.UpdateAdsLoc)
|
||||
adsLoc.POST("/del", advertiseApi.DelAdsLoc)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"stat/api/agentApi"
|
||||
"stat/api/channelApi"
|
||||
)
|
||||
|
||||
func agentRouter(router *gin.RouterGroup) {
|
||||
agent := router.Group("/agent")
|
||||
{
|
||||
agent.POST("/login", agentApi.AgentLogin)
|
||||
agent.POST("/channel/add", agentApi.AddAgentChannel)
|
||||
agent.POST("/imgVerify", agentApi.AgentImgVerifyCode)
|
||||
agent.POST("/channel/list", agentApi.AgentChannelList)
|
||||
agent.POST("/channel/stat", agentApi.GetAgentChannelStat)
|
||||
agent.POST("/summary/home", agentApi.GetAgentSummaryStatHome)
|
||||
agent.POST("/summary/child", agentApi.GetAgentSummaryStatChild)
|
||||
agent.POST("/channel/landpage", agentApi.ChannelAppInfo)
|
||||
agent.POST("/channel/rule/update", agentApi.AgentChannelRuleUpdate)
|
||||
agent.POST("/channel/info/update", agentApi.AgentChannelInfoUpdate)
|
||||
agent.POST("/channel/password/update", agentApi.AgentChannelPasswordUpdate)
|
||||
agent.POST("/channel/password/reset", agentApi.AgentChannelPasswordReset)
|
||||
agent.POST("/channel/applies", channelApi.GetApplyForm)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"stat/api/announApi"
|
||||
)
|
||||
|
||||
func announceRouter(router *gin.RouterGroup) {
|
||||
// 公告
|
||||
ads := router.Group("/announce")
|
||||
{
|
||||
ads.POST("/list", announApi.ListAnnounce)
|
||||
ads.POST("/add", announApi.AddAnnounce)
|
||||
ads.POST("/update", announApi.UpdateAnnounce)
|
||||
ads.POST("/del", announApi.DelAnnounce)
|
||||
// 外部获取公告
|
||||
ads.POST("/get", announApi.GetAnnounce)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"stat/api/appInfoApi"
|
||||
"stat/api/domainapi"
|
||||
"stat/api/monitorApi"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func appInfoRouter(router *gin.RouterGroup) {
|
||||
appInfo := router.Group("/appInfo")
|
||||
{
|
||||
appInfo.POST("/list", appInfoApi.ListAppInfo)
|
||||
appInfo.POST("/add", appInfoApi.AddAppInfo)
|
||||
appInfo.POST("/update", appInfoApi.UpdateAppInfo)
|
||||
appInfo.DELETE("/del", appInfoApi.DelAppInfo)
|
||||
}
|
||||
|
||||
landingPage := router.Group("/landingPage")
|
||||
{
|
||||
landingPage.POST("/list", appInfoApi.ListLandingPageInfo)
|
||||
landingPage.POST("/add", appInfoApi.AddLandingPageInfo)
|
||||
landingPage.POST("/update", appInfoApi.UpdateLandingPageInfo)
|
||||
landingPage.DELETE("/del", appInfoApi.DelLandingPageInfo)
|
||||
}
|
||||
|
||||
landPageConfig := router.Group("/landPageConfig")
|
||||
{
|
||||
landPageConfig.POST("/list", appInfoApi.ListLandPageConfig)
|
||||
landPageConfig.POST("/add", appInfoApi.AddLandPageConfig)
|
||||
landPageConfig.POST("/update", appInfoApi.UpdateLandPageConfig)
|
||||
landPageConfig.POST("/del", appInfoApi.DelLandPageConfig)
|
||||
landPageConfig.POST("/getByType", appInfoApi.GetLandPageConfigByType)
|
||||
}
|
||||
|
||||
domainInfo := router.Group("/domain")
|
||||
{
|
||||
domainInfo.POST("/list", domainapi.ListDomainInfo)
|
||||
domainInfo.POST("/add", domainapi.AddDomainInfo)
|
||||
domainInfo.POST("/update", domainapi.UpdateDomainInfo)
|
||||
domainInfo.DELETE("/del", domainapi.DelDomainInfo)
|
||||
}
|
||||
monitor := router.Group("/monitor")
|
||||
{
|
||||
monitor.POST("/list", monitorApi.SearchMonitor)
|
||||
monitor.POST("/add", monitorApi.AddMonitor)
|
||||
monitor.POST("/update", monitorApi.UpdateMonitor)
|
||||
monitor.DELETE("/del", monitorApi.DelMonitor)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"stat/api/applicationapi"
|
||||
"stat/api/web_appcategory"
|
||||
"stat/api/web_application"
|
||||
"stat/api/web_applicationstat"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func applicationRouter(router *gin.RouterGroup) {
|
||||
// 配置的app列表
|
||||
application := router.Group("/web/apps")
|
||||
{
|
||||
application.POST("/list", web_application.GetApplications)
|
||||
application.POST("/add", web_application.AddApplication)
|
||||
application.POST("/update", web_application.UpdateApplication)
|
||||
application.POST("/del", web_application.DelApplication)
|
||||
application.POST("/stat", web_applicationstat.GetApplicationStat)
|
||||
application.POST("/stattotal", web_applicationstat.GetApplicationTotalStat)
|
||||
|
||||
// 外部获取application
|
||||
application.POST("/get", applicationapi.GetApplication)
|
||||
// app点击请求统计中心redis
|
||||
application.POST("/click", applicationapi.ApplicationClick)
|
||||
/*// 广告统计
|
||||
ads.POST("/stat", advertiseApi.GetAdvertiseStat)
|
||||
*/
|
||||
}
|
||||
|
||||
// 广告位置
|
||||
adsLoc := router.Group("/appLoc")
|
||||
{
|
||||
adsLoc.POST("/list", applicationapi.ListAppLoc)
|
||||
adsLoc.POST("/add", applicationapi.AddAppLoc)
|
||||
adsLoc.POST("/update", applicationapi.UpdateAppLoc)
|
||||
adsLoc.POST("/del", applicationapi.DelAppLoc)
|
||||
}
|
||||
}
|
||||
|
||||
func appcategoryRouter(router *gin.RouterGroup) {
|
||||
apps := router.Group("/web/appcategory")
|
||||
{
|
||||
apps.POST("/add", web_appcategory.AddAppCategory)
|
||||
apps.POST("/del", web_appcategory.DelAppCategory)
|
||||
apps.POST("/update", web_appcategory.UpdateAppCategory)
|
||||
apps.POST("/list", web_appcategory.GetAppCategories)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"stat/api/authorityApi"
|
||||
)
|
||||
|
||||
func authorityRouter(router *gin.RouterGroup) {
|
||||
group := router.Group("/authority")
|
||||
{
|
||||
group.POST("/list", authorityApi.RoleList)
|
||||
group.POST("/add", authorityApi.AddRole)
|
||||
group.POST("/update", authorityApi.UpdateRole)
|
||||
group.DELETE("/del", authorityApi.DelRole)
|
||||
}
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"stat/common/enum/consts"
|
||||
"stat/middleware/auth"
|
||||
"stat/middleware/cors"
|
||||
"stat/statg"
|
||||
"strconv"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
_ "stat/docs"
|
||||
|
||||
swaggerFiles "github.com/swaggo/files"
|
||||
ginSwagger "github.com/swaggo/gin-swagger"
|
||||
)
|
||||
|
||||
var (
|
||||
modMap = map[consts.RunMod]string{
|
||||
consts.RunModeDev: gin.DebugMode,
|
||||
consts.RunModeTest: gin.TestMode,
|
||||
consts.RunModRelease: gin.ReleaseMode,
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
apiNot = errors.New("ApiNotFound")
|
||||
methodNot = errors.New("MethodNotFound")
|
||||
)
|
||||
|
||||
// SetupGin 初始化gin router
|
||||
func SetupGin() *gin.Engine {
|
||||
ginMod()
|
||||
router := ginEngine()
|
||||
registerMiddleware(router)
|
||||
registerRouter(router)
|
||||
if statg.Conf.RunMod != consts.RunModRelease {
|
||||
setGinSwagger(router)
|
||||
}
|
||||
return router
|
||||
}
|
||||
|
||||
func ginMod() {
|
||||
mod := modMap[statg.Conf.RunMod]
|
||||
if mod == "" {
|
||||
mod = "debug"
|
||||
}
|
||||
gin.SetMode(mod)
|
||||
}
|
||||
|
||||
func ginEngine() *gin.Engine {
|
||||
router := gin.Default()
|
||||
router.HandleMethodNotAllowed = true
|
||||
router.MaxMultipartMemory = 60 << 20
|
||||
|
||||
//pprof.Register(router, "/1D35BBAB35F3/pprof")
|
||||
|
||||
router.Use(cors.Cors(&cors.Options{
|
||||
Origin: nil,
|
||||
Methods: []string{http.MethodGet, http.MethodPost, http.MethodPut, http.MethodHead, http.MethodDelete},
|
||||
AllowedHeaders: []string{"Content-Length", "Content-Type", "Authorization", "X-User-Agent", "User-Agent"},
|
||||
ExposedHeaders: []string{"Content-Disposition", "Refresh-Authorization", "Cur-Ver"},
|
||||
OptionsSuccessStatus: http.StatusOK,
|
||||
}))
|
||||
|
||||
router.NoMethod(func(c *gin.Context) {
|
||||
c.JSON(http.StatusMethodNotAllowed, methodNot)
|
||||
})
|
||||
|
||||
router.NoRoute(func(c *gin.Context) {
|
||||
c.JSON(http.StatusNotFound, apiNot)
|
||||
})
|
||||
|
||||
return router
|
||||
}
|
||||
|
||||
func registerMiddleware(router *gin.Engine) {
|
||||
// router.Use(limit.Limit())
|
||||
router.Use(auth.Auth)
|
||||
}
|
||||
|
||||
func registerRouter(router *gin.Engine) {
|
||||
rootRouter := router.Group("/api/stat")
|
||||
{
|
||||
adminRouter(rootRouter) // 管理员管理及登陆
|
||||
authorityRouter(rootRouter) // 角色权限管理
|
||||
appInfoRouter(rootRouter) // App及落地页管理
|
||||
channelRouter(rootRouter) // 渠道扣量结算等管理及统计
|
||||
agentRouter(rootRouter) // 代理管理及统计模块
|
||||
statRouter(rootRouter) // 数据统计
|
||||
fileRouter(rootRouter) // 文件上传
|
||||
opLogRouter(rootRouter) // 操作日志管理
|
||||
adsRouter(rootRouter) // 广告管理
|
||||
versionRouter(rootRouter) // 版本落地页
|
||||
announceRouter(rootRouter) // 公告管理
|
||||
activityRouter(rootRouter) // 活动抽奖
|
||||
statadvertiseRouter(rootRouter) // 广告统计
|
||||
innerRouter(rootRouter) // 服务器同步
|
||||
applicationRouter(rootRouter) // 配置app应用
|
||||
appcategoryRouter(rootRouter) // app分类
|
||||
userInviteRouter(rootRouter) // 兼容
|
||||
}
|
||||
}
|
||||
|
||||
func setGinSwagger(router *gin.Engine) {
|
||||
url := ginSwagger.URL(fmt.Sprintf("http://%s:%s/swagger/doc.json", statg.Conf.Host, strconv.Itoa(statg.Conf.Port)))
|
||||
router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, url))
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"stat/api/channelApi"
|
||||
"stat/api/mediaapi"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func channelRouter(router *gin.RouterGroup) {
|
||||
channel := router.Group("/channelInfo") // 渠道信息
|
||||
{
|
||||
channel.POST("/list", channelApi.GetChannelInfo) // 显示增加了钱包项
|
||||
channel.POST("/export", channelApi.GetChannelInfoExport)
|
||||
channel.POST("/add", channelApi.AddOneChannelInfo)
|
||||
channel.POST("/del", channelApi.DelOneChannelInfo)
|
||||
channel.POST("/update", channelApi.UpdateOneChannelInfo) // 提交参数增加钱包项
|
||||
channel.POST("/owner/update", channelApi.UpdateOneChannelOwner) // 更新一个渠道管理的所有者
|
||||
channel.POST("/ownerchange/list", channelApi.SearchChannelOwnerChange) // 渠道所有者变更信息
|
||||
}
|
||||
userinfo := router.Group("/user")
|
||||
{
|
||||
userinfo.POST("/info", channelApi.SearchUserInfo)
|
||||
}
|
||||
|
||||
channelRule := router.Group("/channelRule") // 扣量规则
|
||||
{
|
||||
channelRule.POST("/list", channelApi.GetChannelDeductionRule)
|
||||
channelRule.POST("/add", channelApi.AddOneChannelDeductionRule)
|
||||
channelRule.POST("/del", channelApi.DelOneChannelDeductionRule)
|
||||
channelRule.POST("/update", channelApi.UpdateOneChannelDeductionRule)
|
||||
}
|
||||
|
||||
settlementinfo := router.Group("/settlementinfo") // 结算信息
|
||||
{
|
||||
settlementinfo.POST("/list", channelApi.GetSearchSettlementInfo)
|
||||
settlementinfo.POST("/export", channelApi.GetSearchSettlementInfoExport)
|
||||
settlementinfo.POST("/add", channelApi.AddOneSettlementInfo)
|
||||
settlementinfo.POST("/update", channelApi.UpdateOneSettlementInfo)
|
||||
settlementinfo.POST("/v2/add", channelApi.AddOneSettlementInfo2)
|
||||
settlementinfo.POST("/v2/update", channelApi.UpdateOneSettlementInfo2)
|
||||
settlementinfo.POST("/v2/del", channelApi.DelOneSettlementInfo)
|
||||
settlementinfo.POST("/v2/detail", channelApi.DetailOneSettlementInfo)
|
||||
settlementinfo.POST("/deleted/list", channelApi.GetSearchDeletedSettlementInfo)
|
||||
settlementinfo.POST("/v2/export", channelApi.GetSearchSettlementInfoApplyExport)
|
||||
settlementinfo.POST("/applicant/list", channelApi.GetSettlementApplicantList)
|
||||
}
|
||||
|
||||
channelStat := router.Group("/channelStat") // 每日统计
|
||||
{
|
||||
// /api/stat/channelstat/export
|
||||
channelStat.POST("/export", channelApi.ListChannelStatExport)
|
||||
channelStat.POST("/list", channelApi.GetChannelStat)
|
||||
channelStat.POST("/settlement/list", channelApi.GetChannelSettlementStat)
|
||||
// 结算列表统计信息,用户可以选择
|
||||
channelStat.POST("/settlement/v2/list", channelApi.GetChannelSettlementStat2)
|
||||
// 对用户选择的项目进行结算计算
|
||||
channelStat.POST("/settlement/v2/calc", channelApi.GetChannelSettlementCalc)
|
||||
channelStat.POST("/compare/list", channelApi.SearchChannelStatCompared)
|
||||
}
|
||||
channelSettlement := router.Group("/channelSettlement")
|
||||
{
|
||||
channelSettlement.POST("/list", channelApi.GetChannelSettlement)
|
||||
}
|
||||
|
||||
mediatag := router.Group("/mediatag")
|
||||
{
|
||||
mediatag.POST("/list", mediaapi.GetMediaTag)
|
||||
mediatag.POST("/add", mediaapi.AddOneLandpage)
|
||||
mediatag.POST("/del", mediaapi.DelOneLandpage)
|
||||
mediatag.POST("/update", mediaapi.UpdateOneLandpage)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"stat/api/fileApi"
|
||||
"stat/api/mediaapi"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func fileRouter(router *gin.RouterGroup) {
|
||||
group := router.Group("/file")
|
||||
{
|
||||
group.POST("/upload", fileApi.FileUpload)
|
||||
}
|
||||
groupmedia := router.Group("/media")
|
||||
{
|
||||
groupmedia.POST("/delete", mediaapi.VideoDelete)
|
||||
groupmedia.POST("/update", mediaapi.VideoUpdate)
|
||||
groupmedia.POST("/search", mediaapi.VideoSearch)
|
||||
groupmedia.POST("/videoOk", mediaapi.VideoOK)
|
||||
groupmedia.POST("/videoBody", mediaapi.VideoBody)
|
||||
|
||||
groupmedia.GET("/m3u8/*key", mediaapi.GetM3U8) // m3u8
|
||||
groupmedia.GET("/enkey", mediaapi.Enkey) // enkey
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"stat/api/innerapi"
|
||||
"stat/middleware/inner"
|
||||
"stat/statg"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func innerRouter(router *gin.RouterGroup) {
|
||||
plain := router.Group("/inner")
|
||||
{
|
||||
plain.POST("/appDownload", innerapi.AppDownload)
|
||||
plain.POST("/recharge/list", innerapi.InnerRechargeList)
|
||||
plain.POST("/rechargebotcmd/list", innerapi.InnerRechargeBotcmdList)
|
||||
}
|
||||
crypt := router.Group("/inner", inner.Crypt(statg.Conf.InnerKey))
|
||||
{
|
||||
crypt.POST("/botMonthStat", innerapi.BotMonthStatList)
|
||||
crypt.POST("/botStatList", innerapi.BotDailyHourList)
|
||||
crypt.POST("/botStatOne", innerapi.BotDailyHourOne)
|
||||
crypt.POST("/appList", innerapi.ListAppInfo)
|
||||
crypt.POST("/sendTgMessage", innerapi.SendTgMessage)
|
||||
///api/stat/inner/sendTgMessage
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"stat/api/adminApi"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func lotteryRouter(router *gin.RouterGroup) {
|
||||
group := router.Group("/lottery")
|
||||
{
|
||||
group.POST("/login", adminApi.AdminLogin)
|
||||
group.POST("/verify", adminApi.AdminVerify)
|
||||
group.POST("/list", adminApi.AdminList)
|
||||
group.POST("/add", adminApi.AddAdmin)
|
||||
group.POST("/update", adminApi.UpdateAdmin)
|
||||
group.DELETE("/del", adminApi.DelAdmin)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"stat/api/opLogApi"
|
||||
)
|
||||
|
||||
func opLogRouter(router *gin.RouterGroup) {
|
||||
group := router.Group("/opLog")
|
||||
{
|
||||
group.POST("/list", opLogApi.ListOpLog)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"stat/api/statApi"
|
||||
)
|
||||
|
||||
func statRouter(router *gin.RouterGroup) {
|
||||
blocChannelCodeStat := router.Group("/blocChannelCodeStat")
|
||||
{
|
||||
blocChannelCodeStat.POST("/list", statApi.ListBlocChannelCodeStat)
|
||||
blocChannelCodeStat.POST("/export", statApi.ExportBlocChannelCodeStat)
|
||||
}
|
||||
gameStat := router.Group("/game")
|
||||
{
|
||||
gameStat.POST("/withdraw/list", statApi.GameWithdrawDetails)
|
||||
gameStat.POST("/recharge/list", statApi.GameRechargerDetails)
|
||||
|
||||
}
|
||||
daily := router.Group("/dailyStat")
|
||||
{
|
||||
daily.POST("/list", statApi.ListDailyStat)
|
||||
daily.POST("/export", statApi.ListDailyStatExport)
|
||||
}
|
||||
dailyhour := router.Group("/dailyhour")
|
||||
{
|
||||
dailyhour.POST("/list", statApi.ListDailyHourStat)
|
||||
dailyhour.POST("/export", statApi.ListDailyHourStatExport)
|
||||
}
|
||||
|
||||
minuteStat := router.Group("/minuteStat")
|
||||
{
|
||||
minuteStat.POST("/list", statApi.ListMinuteStat)
|
||||
}
|
||||
|
||||
hourStatLine := router.Group("/hourStat")
|
||||
{
|
||||
hourStatLine.POST("/list", statApi.ListHourStatLine)
|
||||
}
|
||||
|
||||
blocDailyStat := router.Group("/blocDailyStat")
|
||||
{
|
||||
blocDailyStat.POST("/list", statApi.ListBlocDailyStat)
|
||||
}
|
||||
blocDailyStatTotal := router.Group("/blocDailyStatTotal")
|
||||
{
|
||||
blocDailyStatTotal.POST("/list", statApi.ListBlocDailyTotalStat)
|
||||
}
|
||||
|
||||
blocRegisterDetails := router.Group("/blocRegisterDetails")
|
||||
{
|
||||
blocRegisterDetails.POST("/list", statApi.ListBlocRegisterDetails)
|
||||
}
|
||||
BlocRechargeChannel := router.Group("/BlocRechargeChannel")
|
||||
{
|
||||
BlocRechargeChannel.POST("/list", statApi.ListBlocRechargeChannel)
|
||||
}
|
||||
|
||||
blocRechargeDetails := router.Group("/blocRechargeDetails")
|
||||
{
|
||||
blocRechargeDetails.POST("/list", statApi.ListBlocRechargerDetails)
|
||||
}
|
||||
blocBlocWithdrawDetails := router.Group("/blocBlocWithdrawDetails")
|
||||
{
|
||||
blocBlocWithdrawDetails.POST("/list", statApi.ListBlocWithdrawDetails)
|
||||
}
|
||||
landPage := router.Group("/landPage")
|
||||
{
|
||||
landPage.POST("/daily/list", statApi.ListLandPageDailyStat)
|
||||
landPage.POST("/hour/list", statApi.ListLandPageHourStat)
|
||||
landPage.POST("/summary/downTotal/list", statApi.ListLandPageSummaryDownTotal)
|
||||
}
|
||||
jtsp := router.Group("/daily-stat")
|
||||
{
|
||||
jtsp.POST("/jtspV2", statApi.GetBlocDailyStatTgbotInfo)
|
||||
jtsp.POST("/hour", statApi.GetAppHourDataStatInfo)
|
||||
jtsp.POST("/rank", statApi.GetAppHourDataStatInfoRank)
|
||||
jtsp.POST("/total", statApi.GetTianyuAppDailyData)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"stat/api/dailystatadvertise"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func statadvertiseRouter(router *gin.RouterGroup) {
|
||||
group := router.Group("/statadvertise")
|
||||
{
|
||||
group.POST("/list", dailystatadvertise.GetDailyStatAdvertise)
|
||||
group.POST("/add", dailystatadvertise.AddOneDailyStatAdvertise)
|
||||
group.POST("/update", dailystatadvertise.UpdateOneDailyStatAdvertise)
|
||||
group.DELETE("/del", dailystatadvertise.DelOneDailyStatAdvertise)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"stat/api/userinviteapi"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func userInviteRouter(router *gin.RouterGroup) {
|
||||
channelCode := router.Group("/userInvite")
|
||||
{
|
||||
channelCode.POST("/district", userinviteapi.UserDistictInfo)
|
||||
}
|
||||
userRoute := router.Group("/user")
|
||||
{
|
||||
userRoute.POST("/districtcode", userinviteapi.UserDistrictCode)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"stat/api/versionApi"
|
||||
"stat/middleware/limit"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func versionRouter(router *gin.RouterGroup) {
|
||||
group := router.Group("/version")
|
||||
{
|
||||
group.POST("/list", versionApi.VersionList)
|
||||
group.POST("/add", versionApi.VersionAdd)
|
||||
group.POST("/update", versionApi.VersionUpdate)
|
||||
group.POST("/del", versionApi.VersionDelete)
|
||||
// 落地页
|
||||
group.POST("/bottonlist", versionApi.LandingpageButtonList)
|
||||
group.POST("/h5/config", versionApi.GetH5Config)
|
||||
group.GET("/h5/config", versionApi.GetH5Config)
|
||||
group.POST("/channel/newLink", versionApi.NewChannelDownLoadLink)
|
||||
// 第三方
|
||||
group.POST("/app", versionApi.AppVersion)
|
||||
// 测试
|
||||
group.POST("/h5/config/v2", versionApi.GetH5ConfigV2)
|
||||
}
|
||||
|
||||
landGroup := router.Group("/version", limit.Limit("landPageIpLimit", 10, 1))
|
||||
{ // 落地页点击
|
||||
landGroup.POST("/crossbottonclick", versionApi.CrossButtonClick)
|
||||
landGroup.POST("/bottonclick", versionApi.LandingpageButtonClick)
|
||||
}
|
||||
|
||||
shareUrl := router.Group("/share")
|
||||
{
|
||||
shareUrl.POST("/list", versionApi.ShareUrlList)
|
||||
}
|
||||
|
||||
picture := router.Group("/landpage/picture")
|
||||
{
|
||||
picture.POST("/list", versionApi.GetLandpagePicture)
|
||||
picture.POST("/add", versionApi.AddOneLandpage)
|
||||
picture.POST("/del", versionApi.DelOneLandpage)
|
||||
picture.POST("/update", versionApi.UpdateOneLandpage)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user