package com.yonge.cooleshow.student.controller;

import com.yonge.cooleshow.biz.dal.service.MusicTagService;
import com.yonge.cooleshow.biz.dal.vo.MusicTagVo;
import com.yonge.cooleshow.common.controller.BaseController;
import com.yonge.cooleshow.common.entity.HttpResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/MusicTag")
@Api(value = "音乐标签表", tags = "音乐标签表")
public class MusicTagController extends BaseController {

    @Autowired
    private MusicTagService musicTagService;

	/**
	 * 查询分页tree
	 */
	@GetMapping("/tree")
	@ApiOperation(value = "查询标签树列表")
	public HttpResponseResult<List<MusicTagVo>> tree() {
		List<MusicTagVo> treeList = musicTagService.selectMusicTagTree();
		return succeed(treeList);
	}

}