package com.red.circle.console.adapter.app.game;

import com.red.circle.console.app.dto.clienobject.game.GameRoomPkCO;
import com.red.circle.console.app.dto.clienobject.game.GameTeamPkCO;
import com.red.circle.console.app.service.app.game.GamePkService;
import com.red.circle.framework.web.controller.BaseController;
import com.red.circle.other.inner.model.cmd.game.GameRoomPkRecordQryCmd;
import com.red.circle.other.inner.model.cmd.game.GameTeamPkRecordQryCmd;
import java.util.List;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Game PK 前端控制器.
 *
 * @author pengshigang
 * @since 2022-09-14
 */
@AllArgsConstructor
@RestController
@RequestMapping("/game/pk")
public class GamePkRestController extends BaseController {

  private final GamePkService gamePkService;

  /**
   * 查询记录.
   */
  @GetMapping("/list-room-pk")
  public List<GameRoomPkCO> listRoomPk(GameRoomPkRecordQryCmd query) {
    return gamePkService.listRoomPk(query);
  }

  /**
   * 查询记录.
   */
  @GetMapping("/list-team-pk")
  public List<GameTeamPkCO> listTeamPk(GameTeamPkRecordQryCmd query) {
    return gamePkService.listTeamPk(query);
  }


}
