关卡列表
This commit is contained in:
parent
289fe1c009
commit
7c84d070d9
|
@ -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();
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue