66 lines
1.8 KiB
Java
66 lines
1.8 KiB
Java
|
package com.example.catchTheLetters.controller;
|
|||
|
|
|||
|
import com.example.catchTheLetters.entity.Level;
|
|||
|
import com.example.catchTheLetters.entity.RankVo;
|
|||
|
import com.example.catchTheLetters.entity.ScoreInfo;
|
|||
|
import com.example.catchTheLetters.utils.R;
|
|||
|
import io.swagger.annotations.Api;
|
|||
|
import io.swagger.annotations.ApiOperation;
|
|||
|
import io.swagger.annotations.ApiParam;
|
|||
|
import lombok.extern.slf4j.Slf4j;
|
|||
|
import org.springframework.web.bind.annotation.*;
|
|||
|
|
|||
|
/**
|
|||
|
* 关卡控制器
|
|||
|
* @author spyn
|
|||
|
*/
|
|||
|
@RestController
|
|||
|
@Slf4j
|
|||
|
@Api(tags = "关卡API")
|
|||
|
@RequestMapping("/level")
|
|||
|
public class LevelController {
|
|||
|
@ApiOperation(value = "关卡列表(只返回ID、名称和类型)")
|
|||
|
@GetMapping("/list")
|
|||
|
public R<Level> list() {
|
|||
|
return null;
|
|||
|
}
|
|||
|
|
|||
|
@ApiOperation(value = "关卡详情")
|
|||
|
@GetMapping("/detail")
|
|||
|
@ApiParam(name = "id", value = "关卡ID")
|
|||
|
public R<Level> detail(Long id) {
|
|||
|
return null;
|
|||
|
}
|
|||
|
|
|||
|
@ApiOperation(value = "关卡创建(web前端管理员提交)")
|
|||
|
@PostMapping("/create")
|
|||
|
public R create(@RequestBody Level level) {
|
|||
|
return null;
|
|||
|
}
|
|||
|
|
|||
|
@ApiOperation(value = "关卡修改(web前端管理员提交)")
|
|||
|
@PostMapping("/update")
|
|||
|
public R update(@RequestBody Level level) {
|
|||
|
return null;
|
|||
|
}
|
|||
|
|
|||
|
@ApiOperation(value = "关卡删除(web前端管理员提交)")
|
|||
|
@PostMapping("/delete")
|
|||
|
public R delete(Long id) {
|
|||
|
return null;
|
|||
|
}
|
|||
|
|
|||
|
@ApiOperation(value = "获取某个关卡排行榜数据")
|
|||
|
@GetMapping("/rank")
|
|||
|
@ApiParam(name = "id", value = "关卡ID")
|
|||
|
public R<RankVo> rank(Long id) {
|
|||
|
return null;
|
|||
|
}
|
|||
|
|
|||
|
@ApiOperation(value = "关卡结算(游戏结束时提交,一定要鉴别token)")
|
|||
|
@PostMapping("/settle")
|
|||
|
public R settle(@RequestBody ScoreInfo scoreInfo) {
|
|||
|
return null;
|
|||
|
}
|
|||
|
}
|