🔥作者:雨晨源码🔥
💖简介:java、微信小程序、安卓;定制开发,远程调试 代码讲解,文档指导,ppt制作💖
精彩专栏推荐订阅:在下方专栏👇🏻👇🏻👇🏻👇🏻
Java精彩实战毕设项目案例
小程序精彩项目案例
Python实战项目案例
💕💕文末获取源码
本次文章主要是介绍SpringBoot在线音乐网站的功能,系统分为二个角色,分别是用户和管理员
在线音乐网站-系统前言简介
在经济高速发展前行的现代,人们的物质生活已经得到满足,逐步追求精神上的需求。音乐作为人们日常生活必不可少的一部分,一直被大家所喜爱。因为互联网的出现,人们对音乐的欣赏方式也有了更多的选择。各种各样的音乐网站也接连的诞生,目前,市场上大多数的网站都注重如何提高音质,或者是以直播为中心来从中获取收入。他们似乎不确定新一代人的个性化需求,人们对快餐式的音乐轰炸并不感兴趣,更多的是注重自我感受和自己对音乐类型的偏好。在大数据时代,我们可以提供来自数据的信息以满足他们的需求。这也是未来在线音乐网站发展的方向。
本文主要讲述了,根据网络音乐的实际情况 ,通过对网站有关音乐媒体发布事项的一番调查与分析,在用户对音乐的需求的解析基础上,明确了在线音乐系统要实现的具体功能,并阐述系统结构设计和功能设计,从而实现一个在线音乐网站的设计与应用。
在线音乐网站-开发技术与环境
- 开发语言:Java
- 后端框架:SpringBoot(spring+springmvc+mybatis)
- 前端:vue
- 数据库:MySQL
- 系统架构:B/S
- 开发工具:jdk1.8、Tomcat8.5(内置)、Navicat,IDEA(Eclipse、MyEclipse )选其一
在线音乐网站-功能介绍
2个角色:用户/管理员(亮点:echarts可视化统计)
用户:首页,登陆注册,歌单,歌手,我的音乐,播放快进,收藏,评论点赞,查看歌词,搜索音乐,个人资料修改等…
管理员:系统首页,用户管理,歌手管理,歌单管理,系统首页(用户性别扇形图,歌曲类型分布柱状图,歌手性别统计图,歌手国籍分布图)等…
在线音乐网站-演示图片
1.用户端页面:
☀️首页☀️
☀️我的音乐☀️
☀️歌词☀️
☀️歌单☀️
☀️歌手☀️
☀️评论☀️
:sunny:编辑个人资料:sunny:
![在这里插入图片描述](https://img-blog.csdnimg.cn/ee77e0fd29e84b358d4045596b210278.png)
2.管理员端页面:
☀️统计图1☀️
☀️统计图2☀️
☀️歌单管理☀️
☀️歌手管理☀️
☀️用户管理.☀️
在线音乐网站-代码展示
1.收藏歌曲【具体代码:】
添加收藏的歌曲
@ResponseBody
@RequestMapping(value = "/collection/add", method = RequestMethod.POST)
public Object addCollection(HttpServletRequest req){
JSONObject jsonObject = new JSONObject();
String user_id = req.getParameter("userId");
String type = req.getParameter("type");
String song_id=req.getParameter("songId");
String song_list_id=req.getParameter("songListId");
if (song_id == ""){
jsonObject.put("code", 0);
jsonObject.put("msg", "收藏歌曲为空");
return jsonObject;
} else if (collectService.existSongId(Integer.parseInt(user_id), Integer.parseInt(song_id))) {
jsonObject.put("code", 2);
jsonObject.put("msg", "已收藏");
return jsonObject;
}
Collect collect = new Collect();
collect.setUserId(Integer.parseInt(user_id));
collect.setType(new Byte(type));
if (new Byte(type) == 0) {
collect.setSongId(Integer.parseInt(song_id));
} else if (new Byte(type) == 1) {
collect.setSongListId(Integer.parseInt(song_list_id));
}
collect.setCreateTime(new Date());
boolean res = collectService.addCollection(collect);
if (res){
jsonObject.put("code", 1);
jsonObject.put("msg", "收藏成功");
return jsonObject;
}else {
jsonObject.put("code", 0);
jsonObject.put("msg", "收藏失败");
return jsonObject;
}
}
// 返回所有用户收藏列表
@RequestMapping(value = "/collection", method = RequestMethod.GET)
public Object allCollection(){
return collectService.allCollect();
}
// 返回的指定用户ID收藏列表
@RequestMapping(value = "/collection/detail", method = RequestMethod.GET)
public Object collectionOfUser(HttpServletRequest req){
String userId = req.getParameter("userId");
return collectService.collectionOfUser(Integer.parseInt(userId));
}
// 删除收藏的歌曲
@RequestMapping(value = "/collection/delete", method = RequestMethod.GET)
public Object deleteCollection(HttpServletRequest req){
String user_id = req.getParameter("userId").trim();
String song_id = req.getParameter("songId").trim();
return collectService.deleteCollect(Integer.parseInt(user_id), Integer.parseInt(song_id));
}
// 更新收藏
@ResponseBody
@RequestMapping(value = "/collection/update", method = RequestMethod.POST)
public Object updateCollectMsg(HttpServletRequest req){
JSONObject jsonObject = new JSONObject();
String id = req.getParameter("id").trim();
String user_id = req.getParameter("userId").trim();
String type = req.getParameter("type").trim();
String song_id = req.getParameter("songId").trim();
// String song_list_id = req.getParameter("songListId").trim();
Collect collect = new Collect();
collect.setId(Integer.parseInt(id));
collect.setUserId(Integer.parseInt(user_id));
collect.setType(new Byte(type));
collect.setSongId(Integer.parseInt(song_id));
boolean res = collectService.updateCollectMsg(collect);
if (res){
jsonObject.put("code", 1);
jsonObject.put("msg", "修改成功");
return jsonObject;
}else {
jsonObject.put("code", 0);
jsonObject.put("msg", "修改失败");
return jsonObject;
}
2.提交评分【具体代码:】
提交评分
@ResponseBody
@RequestMapping(value = "/rank/add", method = RequestMethod.POST)
public Object addRank(HttpServletRequest req){
JSONObject jsonObject = new JSONObject();
String songListId = req.getParameter("songListId").trim();
String consumerId = req.getParameter("consumerId").trim();
String score = req.getParameter("score").trim();
Rank rank = new Rank();
rank.setSongListId(Long.parseLong(songListId));
rank.setConsumerId(Long.parseLong(consumerId));
rank.setScore(Integer.parseInt(score));
boolean res = rankService.addRank(rank);
if (res){
jsonObject.put("code", 1);
jsonObject.put("msg", "评价成功");
return jsonObject;
}else {
jsonObject.put("code", 0);
jsonObject.put("msg", "评价失败");
return jsonObject;
}
}
// 获取指定歌单的评分
@RequestMapping(value = "/rank", method = RequestMethod.GET)
public Object rankOfSongListId(HttpServletRequest req){
String songListId = req.getParameter("songListId");
return rankService.rankOfSongListId(Long.parseLong(songListId));
}
3.歌单管理【具体代码:】
给歌单添加歌曲
@ResponseBody
@RequestMapping(value = "/ListSong/add", method = RequestMethod.POST)
public Object addListSong(HttpServletRequest req){
JSONObject jsonObject = new JSONObject();
String song_id = req.getParameter("songId").trim();
String song_list_id = req.getParameter("songListId").trim();
ListSong listsong = new ListSong();
listsong.setSongId(Integer.parseInt(song_id));
listsong.setSongListId(Integer.parseInt(song_list_id));
boolean res = listSongService.addListSong(listsong);
if (res){
jsonObject.put("code", 1);
jsonObject.put("msg", "添加成功");
return jsonObject;
}else {
jsonObject.put("code", 0);
jsonObject.put("msg", "添加失败");
return jsonObject;
}
}
// 返回歌单里包含的所有歌曲
@RequestMapping(value = "/listSong", method = RequestMethod.GET)
public Object allListSong(){
return listSongService.allListSong();
}
// 返回歌单里指定歌单ID的歌曲
@RequestMapping(value = "/listSong/detail", method = RequestMethod.GET)
public Object listSongOfSongId(HttpServletRequest req){
String songListId = req.getParameter("songListId");
return listSongService.listSongOfSongId(Integer.parseInt(songListId));
}
// 删除歌单里的歌曲
@RequestMapping(value = "/ListSong/delete", method = RequestMethod.GET)
public Object deleteListSong(HttpServletRequest req){
String songId = req.getParameter("songId");
return listSongService.deleteListSong(Integer.parseInt(songId));
}
在线音乐网站-结语(文末获取源码)
💕💕
Java精彩实战毕设项目案例
小程序精彩项目案例
Python实战项目集
💟💟如果大家有任何疑虑,欢迎在下方位置详细交流。