This commit is contained in:
menxipeng
2025-07-16 16:33:05 +08:00
parent 991ca432e1
commit d4178f9043
8 changed files with 78 additions and 39 deletions

View File

@@ -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());
}
}

View File

@@ -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(){
}
}