p配置
This commit is contained in:
@@ -3,7 +3,9 @@ package com.ruoyi.web.controller.client;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.service.IBannerInfoService;
|
||||
import com.ruoyi.system.service.ICategoryInfoService;
|
||||
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;
|
||||
|
||||
@@ -13,11 +15,24 @@ public class IndexController {
|
||||
|
||||
@Autowired
|
||||
private IBannerInfoService bannerInfoService;
|
||||
@Autowired
|
||||
private ICategoryInfoService categoryInfoService;
|
||||
|
||||
/**
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
* 获取banner
|
||||
*/
|
||||
@RequestMapping("/getBanner")
|
||||
public AjaxResult getBanner(){
|
||||
return AjaxResult.success(bannerInfoService.getEnableBanner());
|
||||
}
|
||||
|
||||
// 获取分类
|
||||
@GetMapping("/getCategory")
|
||||
public AjaxResult getCategory(){
|
||||
return AjaxResult.success(categoryInfoService.getCategory());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.ruoyi.web.controller.client;
|
||||
|
||||
|
||||
import com.ruoyi.system.service.IMusicInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -8,4 +10,12 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
public class MusicController {
|
||||
|
||||
@Autowired
|
||||
private IMusicInfoService musicService;
|
||||
|
||||
// 根据分类获取音乐
|
||||
public void getMusicByCate(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user