DrawLotsScenesController.java 2.15 KB
package com.zhongzhi.controller;


import com.zhongzhi.common.utils.ResponseData;
import com.zhongzhi.model.DrawLotsScenesDO;
import com.zhongzhi.service.DrawLotsScenesService;
import com.zhongzhi.vo.ResponseVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author DengMin
 * @since 2025-06-19
 */
@RestController
@RequestMapping("/drawLotsScenes")
@Api("现场赛事")
public class DrawLotsScenesController {

    @Autowired
    private DrawLotsScenesService drawLotsScenesService;

    @PostMapping("allMatchScenes")
    @ApiOperation("查看某一赛道的所有现场 matchId")
    public ResponseVO allMatchScenes(@RequestBody DrawLotsScenesDO drawLotsScenesDO){
        return ResponseData.generateCreatedResponse(0,drawLotsScenesService.allMatchScenes(drawLotsScenesDO));
    }

    @PostMapping("addMatchScene")
    @ApiOperation("添加某一赛道的所有现场 matchId sceneName   openStatus ")
    public ResponseVO addMatchScene(@RequestBody DrawLotsScenesDO drawLotsScenesDO){
        return ResponseData.generateCreatedResponse(0,drawLotsScenesService.addMatchScene(drawLotsScenesDO));
    }

    @PostMapping("updateMatchScene")
    @ApiOperation("修改某一个赛道现场 id  matchId sceneName  openStatus  ")
    public ResponseVO updateMatchScene(@RequestBody DrawLotsScenesDO drawLotsScenesDO){
        return ResponseData.generateCreatedResponse(0,drawLotsScenesService.updateMatchScene(drawLotsScenesDO));
    }

    @PostMapping("deleteMatchScene")
    @ApiOperation("删除某一个赛道现场 id  matchId sceneName  projectCnt  groupCnt  judgeCnt  rankCnt  openStatus  ")
    public ResponseVO deleteMatchScene(@RequestBody DrawLotsScenesDO drawLotsScenesDO){
        return ResponseData.generateCreatedResponse(0,drawLotsScenesService.deleteMatchScene(drawLotsScenesDO));
    }
}