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

View File

@@ -6,16 +6,16 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://192.168.31.55:3306/musicpro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: root
url: jdbc:mysql://rm-2ze15tecas1y876i8xo.mysql.rds.aliyuncs.com:3306/musicpro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: music
password: Q1w2e3r4
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
@@ -39,7 +39,7 @@ spring:
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
webStatFilter:
webStatFilter:
enabled: true
statViewServlet:
enabled: true
@@ -58,4 +58,4 @@ spring:
merge-sql: true
wall:
config:
multi-statement-allow: true
multi-statement-allow: true

View File

@@ -68,7 +68,7 @@ spring:
# redis 配置
redis:
# 地址
host: 192.168.31.55
host: 60.205.107.210
# 端口默认为6379
port: 6379
# 数据库索引
@@ -133,4 +133,4 @@ xss:
ali:
accessKeyId: LTAI5tDWWzwqxumUXTFnkQFd
accessKeySecret: KOD3y6OxbHJ23wxAf68NFpUQXCQEPX
accessKeySecret: KOD3y6OxbHJ23wxAf68NFpUQXCQEPX