关卡列表

This commit is contained in:
石皮幼鸟 2024-04-12 11:17:42 +08:00
parent 289fe1c009
commit 7c84d070d9
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ public class LevelController {
@Resource @Resource
private LevelService levelService; private LevelService levelService;
@ApiOperation(value = "关卡列表只返回ID、名称和类型)") @ApiOperation(value = "关卡列表只返回ID、排序、名称和类型)")
@GetMapping("/list") @GetMapping("/list")
public R<List<Level>> list() { public R<List<Level>> list() {
return levelService.list(); return levelService.list();

View File

@ -39,7 +39,7 @@ public class LevelServiceImpl implements LevelService {
@Override @Override
public R<List<Level>> list() { public R<List<Level>> list() {
Query query = new Query(); Query query = new Query();
query.fields().include("id").include("name").include("type"); query.fields().include("id").include("name").include("type").include("order");
List<Level> levels = mongoTemplate.find(query, Level.class); List<Level> levels = mongoTemplate.find(query, Level.class);
return R.ok(levels); return R.ok(levels);
} }