package org.jeecg.modules.duan.java.controller;

import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONArray;
import org.jeecg.common.api.vo.Result;

import org.jeecg.modules.duan.java.service.MusicService;
import org.jeecg.modules.duan.java.service.MusicService;
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;

@Api(tags = "流行音乐分析平台")
@RestController
@RequestMapping("/cool/music")
@Slf4j
public class DashboardController {
    @Autowired
    MusicService musicService;

    @GetMapping("/getRanking")
    public Result<JSONArray> getRanking() throws InterruptedException {

        Thread.sleep(2000);

        return musicService.getRanking();
    }

}
