package task

import (
	"github.com/gin-gonic/gin"
	v1 "log-server/api/v1"
	"log-server/middleware"
)

type GameTaskRouter struct {
}

func (e *GameTaskRouter) InitGameTaskRouter(Router *gin.RouterGroup) {
	GameTaskRouter := Router.Group("gameTask")
	GameTaskApi := v1.ApiGroupApp.GroupTask.GameTaskApi
	{
		GameTaskRouter.POST("getGameTaskList", GameTaskApi.GetGameTaskList)
		GameTaskRouter.POST("getUsedGameTaskList", GameTaskApi.GetUsedGameTaskList) //获取启用状态的任务
		GameTaskRouter.POST("getGameTaskById", GameTaskApi.GetGameTaskById)
		GameTaskRouter.POST("getGameTaskTargetList", GameTaskApi.GetGameTaskTargetList)
		GameTaskRouter.POST("getGameTaskTargetById", GameTaskApi.GetGameTaskTargetById)
		GameTaskRouter.GET("targetStatistics", GameTaskApi.TargetStatistics)
		GameTaskRouter.POST("everyDayStatistics", GameTaskApi.EveryDayStatistics)
		GameTaskRouter.POST("monthStatistics", GameTaskApi.MonthStatistics)
		GameTaskRouter.POST("gameStatistics", GameTaskApi.GameStatistics)
		GameTaskRouter.POST("gameList", GameTaskApi.GameList)
		GameTaskRouter.POST("getGameTxTaskList", GameTaskApi.GetGameTxTaskList)
		GameTaskRouter.POST("getFeeAccountList", GameTaskApi.GetFeeAccountList)
		GameTaskRouter.POST("taskTargetExport", GameTaskApi.TaskTargetExport)
		GameTaskRouter.POST("getXmyTaskList", GameTaskApi.GetXmyTaskList) //获取小绵羊任务列表
		GameTaskRouter.POST("temporaryTask", GameTaskApi.TemporaryTask)
	}
	GameTaskRouter1 := Router.Group("gameTask").Use(middleware.OperationRecord())
	{
		GameTaskRouter1.POST("create", GameTaskApi.CreateGameTask)
		GameTaskRouter1.POST("statusOperation", GameTaskApi.StatusOperation)
		GameTaskRouter1.POST("update", GameTaskApi.UpdateGameTask)
		GameTaskRouter1.POST("delete", GameTaskApi.DeleteGameTask)
		GameTaskRouter1.POST("updateTarget", GameTaskApi.UpdateGameTaskTarget)
		GameTaskRouter1.POST("taskResetFee", GameTaskApi.TaskResetFee)
	}
}
