package route

import (
	v1 "designs/controller/v1"
	"designs/middleware"
	"github.com/gin-gonic/gin"
)

/* 跨域 */

func SetApiGroupRoutes(router *gin.RouterGroup) {
	// v1 版本
	router.POST("/user/login", v1.Login)                                                        //游戏登录
	router.POST("/user/refreshToken", middleware.RefreshTokenAuthMiddleware(), v1.RefreshToken) //token刷新
	router.POST("/user/getSysTime", v1.GetSysTime)

	GroupV1 := router.Group("")
	GroupV1.Use(middleware.TokenAuthMiddleware()).Use()
	{
		GroupV1.POST("/user/userList", v1.UserList)

		GroupV1.POST("/user/addGidConfig", v1.AddGidConfig)
		GroupV1.POST("/user/getGidConfig", v1.GetGidConfig)

		GroupV1.POST("/user/addUserToBlackList", v1.AddUserToBlackList)
		GroupV1.POST("/user/deleteUserToBlackList", v1.DeleteUserFormBlackList)
		GroupV1.POST("/user/readBlackList", v1.ReadBlackList)

		GroupV1.POST("/user/addUserOption", v1.AddUserOption)
		GroupV1.POST("/user/getUserOption", v1.GetUserOption)

		//GroupV1.POST("/user/overview", v1.Overview)
		GroupV1.POST("/user/summary", v1.Summary)
		GroupV1.POST("/user/getInterfaceLog", v1.GetInterfaceLog)
		GroupV1.POST("/user/getInterfaceInfo", v1.GetInterfaceInfo)
		GroupV1.POST("/user/getInterfaceData", v1.GetInterfaceData)
		GroupV1.POST("/user/getInterfaceDataByDay", v1.GetInterfaceDataByDay)

		GroupV1.POST("/user/getUserOnlineMsg", v1.GetUserOnlineMsg)

		GroupV1.POST("/user/timeDistributionData", v1.TimeDistributionData)
		GroupV1.POST("/user/mouthDistributionData", v1.MouthDistributionData)
		GroupV1.POST("/user/userTrendsOverview", v1.UserTrendsOverview)
		GroupV1.POST("/user/dataTrades", v1.DataTrades)
		GroupV1.POST("/user/dataTradesDetail", v1.DataTradesDetail)
		GroupV1.POST("/user/remainDataBydDay", v1.RemainDataBydDay)

		//游戏自定义事件管理
		GroupV1.POST("/user/setGameAction", v1.SetGameAction)
		GroupV1.POST("/user/updateGameAction", v1.UpdateGameAction)
		GroupV1.POST("/user/updateGameActionOption", v1.UpdateGameActionOption)
		GroupV1.POST("/user/addGameActionOption", v1.AddGameActionOption)
		GroupV1.POST("/user/deleteGameActionOption", v1.DeleteGameActionOption)
		GroupV1.POST("/user/gameActionList", v1.GameActionList)
		GroupV1.POST("/user/gameActionDetail", v1.GameActionDetail)
		GroupV1.POST("/user/gameActionOptionList", v1.GameActionOptionList)

		//游戏自定义事件统计
		GroupV1.POST("/user/userActionDetail", v1.UserActionDetail)
		GroupV1.POST("/user/userActionList", v1.UserActionList)
		GroupV1.POST("/user/userActionDetailDistribution", v1.UserActionDetailDistribution)

		GroupV1.POST("/user/behaviorList", v1.BehaviorList)
		GroupV1.POST("/user/adRelatedList", v1.AdRelatedList)
		GroupV1.POST("/user/setGameCondition", v1.SetGameCondition)
		GroupV1.POST("/user/gameConditionList", v1.GameConditionList)

		//广告数据相关接口
		GroupV1.POST("/user/userAdsOverview", v1.UserAdsOverview)
		GroupV1.POST("/user/userAdsDaily", v1.UserAdsDaily)
		GroupV1.POST("/user/userAdsDetail", v1.UserAdsDetail)
	}

	router.POST("/SetUserBehaviorBak", v1.SetUserBehaviorBak)       //测试接口
	router.POST("/DeleteUserBehaviorBak", v1.DeleteUserBehaviorBak) //测试接口
	router.POST("/GetUserNickName", v1.GetUserNickName)             //测试接口
	router.POST("/WriteDBDataToFile", v1.WriteDBDataToFile)         //测试接口
	router.POST("/Websocket", v1.Websocket)                         //测试接口
	router.POST("/Websocket1", v1.Websocket1)                       //测试接口
	router.POST("/Websocket2", v1.Websocket2)                       //测试接口

}
