package com.zanxiang.game.data.serve.controller;

import com.zanxiang.erp.security.annotation.PreAuthorize;
import com.zanxiang.game.data.serve.pojo.vo.GameListVO;
import com.zanxiang.game.data.serve.service.IGameListService;
import com.zanxiang.module.util.pojo.ResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author tianhua
 * @time 2023/9/25
 * @Description 游戏列表接口 查看所有游戏、父游戏、超父游戏列表（ZX_ONE）
 **/
@Api(tags = {"游戏展示列表"})
@RestController
@RequestMapping("/gameList")
@Slf4j
public class GameListController {

    @Autowired
    private IGameListService gameListService;

    @ApiOperation(value = "所有游戏列表")
    @PreAuthorize(permissionKey = "gameData:gameList:game")
    @GetMapping("/list")
    public ResultVO<GameListVO> getGameDataDay() {
        return ResultVO.ok(gameListService.getGameList());
    }

}
