基于java+ssm+vue的音乐管理系统

项目介绍

随着科技的快速的发展和网络信息的普及,信息化管理已经融入到了人们的日常生活中,各行各业都开始采用信息化管理系统,通过计算机信息化管理,首先可以减轻人们工作量,而且采用信息化管理数据信息更加的严谨,可以直接实现智能化管理和数据存储。同样这样的技术也可以直接应用到音乐日常管理中,通过计算机智能化管理可以帮我们推进音乐管理系统的数字化建设。

对音乐管理工作进行了一定的考察和分析后,决定设计一个信息化的基于Web的音乐管理系统,采用Java语言技术进行开发,Mysql数据库进行数据存储,页面技术采用Div+css进行布局设计,通过采用这些技术在功能方面更加的完善,界面方面也更加的美观,符合现代人的审美。经过技术的发展目前的音乐行业里一般也采用了计算机类的音乐网,但是都是综合性的平台,信息种类杂乱,所以经过一番考研调查后,决定设计单纯的音乐管理系统,这样不单单是方便了管理员,对于用户来说了解音乐也更加的方便,直接通过系统就可以进行播放音乐,然后在线评价、交流。

在这里插入图片描述
4.5系统功能设计
根据第三章的功能分析设计出本系统的功能为音乐管理、在线评价、音乐查询、用户注册、评价管理等。本系统的权限分为用户和管理员两种。界面分为管理员界面和前台界面、用户界面。本系统的功能结构图如下图4.1所示:
在这里插入图片描述

开发环境

编程语言:Java
数据库 :Mysql
系统架构:B/S
后端框架:SSM
编译工具:idea或者eclipse,jdk1.8,maven
支持定做:java/php/python/android/小程序/vue/爬虫/c#/asp.net

系统实现

5.2.1用户登录功能的实现界面
  登录功能是识别身份的唯一途径,本系统中的用户为普通用户、管理员。用户在登录时输入的信息需要流入数据库中进行对比。如管理员输入admin admin,数据库则需要对比管理员信息表中是否有admin admin的数据。存在该条数据才可以登录成功,不存在该条数据时会提示错误。用户登录界面的设计效果如下图5.2所示:
在这里插入图片描述

图5.2用户的登录运行界面

5.2.2 前台界面的实现
前台操作界面是门户,一个好的前台界面才可以吸引住用户。本操作界面里含有导航栏、系统名称、信息搜索窗口、音乐展示模块和公告资讯展示模块等。前台操作界面功能的实现界面如下图5.3所示:
在这里插入图片描述

图5.3前台操作展示的效果界面

5.2.3用户注册功能的实现界面
游客可以注册,注册成为用户后才可以评价。用户注册功能的实现界面如下图5.4所示:
在这里插入图片描述

图5.4个用户注册功能的运行界面

5.2.4音乐信息功能的实现界面
在音乐信息界面里可以播放音频和参与评论。音乐浏览功能的实现界面如下图5.5所示:
在这里插入图片描述

图5.5音乐浏览功能的实现界面

5.2.5公告信息功能的实现界面
  在本界面里可以展示所有的公告资讯信息。公告信息功能的实现界面如下图5.6所示:
在这里插入图片描述

图5.6公告信息功能的实现界面

5.2.6论坛功能的实现界面
用户可以查看帖子和回复别人的帖子也可以发布新帖子。论坛功能的实现界面如下图5.7所示:
在这里插入图片描述

图5.7论坛功能的实现界面

5.2.7发表评论功能的实现界面
用户可以发表自己的看法和其它用户进行交流。发表评论功能实现界面如下图5.8所示:
在这里插入图片描述

图5.8发表评论功能的实现界面

5.3用户中心功能的实现
5.3.1个人中心功能的实现
在个人中心里用户可以修改密码和个人资料,实现界面如下图5.9所示:
在这里插入图片描述

图5.9个人中心功能的实现界面

5.3.2论坛信息管理功能实现
在用户中心里用户可以查看自己的帖子以及自己帖子的回复,论坛信息管理的实现界面如下图5.10所示:
在这里插入图片描述

图5.10论坛信息管理功能的实现

帖子回复信息的实现界面如下图5.11所示:
在这里插入图片描述

图5.11帖子回复的实现界面

5.3.3公告信息管理功能的实现
用户只能看公告,不能发布。公告信息管理的实现界面如下图5.12所示:
在这里插入图片描述

图5.12公告信息的实现界面

5.3.4音乐信息管理实现界面
在本界面里用户可以浏览音乐和播放音乐,实现界面如下图5.13所示:
在这里插入图片描述

图5.13音乐信息的实现界面

5.3.5音乐留言管理功能的实现
留言完成后用户可以看到自己的留言内容并看到留言的回复。音乐留言管理功能的实现界面如下图5.14所示:
在这里插入图片描述

图5.14音乐留言管理功能的实现

5.3.6音乐收藏管理功能的实现
用户可以管理收藏夹的内容。音乐收藏功能的实现界面如下图5.15所示:
在这里插入图片描述

图5.15音乐收藏管理功能的界面实现

5.3系统后台管理员功能实现
5.3.1音乐信息管理功能的实现界面
  管理员可以发布音乐信息和实现音乐的修改、删除。音乐信息管理功能的实现界面如下图5.16所示:
在这里插入图片描述

图5.16音乐信息管理功能界面的实现

5.3.2公告信息管理功能的实现界面
本功能包括对公告信息的添加、删除、修改、查询。添加公告时填写公告标题就可以完成,查询公告时填写查询条件即可以查询出来相对应的公告信息。查询公告信息功能的实现界面如下图5.17所示:
在这里插入图片描述

图5.17查询公告信息功能的实现界面

5.3.3音乐留言管理功能的实现界面
音乐留言管理包括审核用户的留言内容和回复用户留言。回复音乐留言功能的实现界面如下图5.18所示:
在这里插入图片描述

图5.18回复音乐留言功能的实现界面

5.3.4用户管理功能的实现
  用户信息可在本功能里进行管理,可以查看用户的注册资料。查询用户信息功能的实现界面如下图5.19所示:
在这里插入图片描述
  
图5.19查询用户信息功能的实现界面

5.3.5管理员管理功能的实现
管理员可以添加设置新的管理员账号和修改、删除已有的管理员账号。管理员管理功能的实现界面如下图5.20所示:
在这里插入图片描述

图5.20管理员管理功能的实现界面

5.3.6基础数据管理功能的实现界面
管理员可以对公告类型和音乐类型进行管理。利用本功能,管理员可以设置新的公告类型和音乐类型。基础数据管理功能的实现界面如下图5.21所示:
在这里插入图片描述

图5.21基础数据管理功能的实现界面

5.3.7论坛信息管理功能的实现
本功能包括收到用户的帖子信息和查看帖子的回复信息以及进行帖子回复和帖子删除。论坛信息管理功能的实现界面如下图5.22所示:
在这里插入图片描述

图5.22论坛信息管理功能的实现界面

核心代码

package com.controller;

import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;

import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;

/**
 * 音乐信息
 * 后端接口
 * @author
 * @email
*/
@RestController
@Controller
@RequestMapping("/yinyue")
public class YinyueController {
    private static final Logger logger = LoggerFactory.getLogger(YinyueController.class);

    @Autowired
    private YinyueService yinyueService;


    @Autowired
    private TokenService tokenService;
    @Autowired
    private DictionaryService dictionaryService;

    //级联表service

    @Autowired
    private YonghuService yonghuService;


    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永不会进入");
        else if("用户".equals(role))
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        if(params.get("orderBy")==null || params.get("orderBy")==""){
            params.put("orderBy","id");
        }
        PageUtils page = yinyueService.queryPage(params);

        //字典表数据转换
        List<YinyueView> list =(List<YinyueView>)page.getList();
        for(YinyueView c:list){
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(c, request);
        }
        return R.ok().put("data", page);
    }

    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id, HttpServletRequest request){
        logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        YinyueEntity yinyue = yinyueService.selectById(id);
        if(yinyue !=null){
            //entity转view
            YinyueView view = new YinyueView();
            BeanUtils.copyProperties( yinyue , view );//把实体数据重构到view中

            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view, request);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody YinyueEntity yinyue, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,yinyue:{}",this.getClass().getName(),yinyue.toString());

        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永远不会进入");

        Wrapper<YinyueEntity> queryWrapper = new EntityWrapper<YinyueEntity>()
            .eq("yinyue_uuid_number", yinyue.getYinyueUuidNumber())
            .eq("yinyue_name", yinyue.getYinyueName())
            .eq("yinyue_types", yinyue.getYinyueTypes())
            .eq("yinyue_music", yinyue.getYinyueMusic())
            .eq("zan_number", yinyue.getZanNumber())
            .eq("cai_number", yinyue.getCaiNumber())
            ;

        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        YinyueEntity yinyueEntity = yinyueService.selectOne(queryWrapper);
        if(yinyueEntity==null){
            yinyue.setInsertTime(new Date());
            yinyue.setCreateTime(new Date());
            yinyueService.insert(yinyue);
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody YinyueEntity yinyue, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,yinyue:{}",this.getClass().getName(),yinyue.toString());

        String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
        //根据字段查询是否有相同数据
        Wrapper<YinyueEntity> queryWrapper = new EntityWrapper<YinyueEntity>()
            .notIn("id",yinyue.getId())
            .andNew()
            .eq("yinyue_uuid_number", yinyue.getYinyueUuidNumber())
            .eq("yinyue_name", yinyue.getYinyueName())
            .eq("yinyue_types", yinyue.getYinyueTypes())
            .eq("yinyue_music", yinyue.getYinyueMusic())
            .eq("zan_number", yinyue.getZanNumber())
            .eq("cai_number", yinyue.getCaiNumber())
            ;

        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        YinyueEntity yinyueEntity = yinyueService.selectOne(queryWrapper);
        if("".equals(yinyue.getYinyuePhoto()) || "null".equals(yinyue.getYinyuePhoto())){
                yinyue.setYinyuePhoto(null);
        }
        if(yinyueEntity==null){
            yinyueService.updateById(yinyue);//根据id更新
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }



    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        yinyueService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }


    /**
     * 批量上传
     */
    @RequestMapping("/batchInsert")
    public R save( String fileName, HttpServletRequest request){
        logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
        Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {
            List<YinyueEntity> yinyueList = new ArrayList<>();//上传的东西
            Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
            Date date = new Date();
            int lastIndexOf = fileName.lastIndexOf(".");
            if(lastIndexOf == -1){
                return R.error(511,"该文件没有后缀");
            }else{
                String suffix = fileName.substring(lastIndexOf);
                if(!".xls".equals(suffix)){
                    return R.error(511,"只支持后缀为xls的excel文件");
                }else{
                    URL resource = this.getClass().getClassLoader().getResource("../../upload/" + fileName);//获取文件路径
                    File file = new File(resource.getFile());
                    if(!file.exists()){
                        return R.error(511,"找不到上传文件,请联系管理员");
                    }else{
                        List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
                        dataList.remove(0);//删除第一行,因为第一行是提示
                        for(List<String> data:dataList){
                            //循环
                            YinyueEntity yinyueEntity = new YinyueEntity();
//                            yinyueEntity.setYinyueUuidNumber(data.get(0));                    //音乐编号 要改的
//                            yinyueEntity.setYinyueName(data.get(0));                    //音乐名称 要改的
//                            yinyueEntity.setYinyueTypes(Integer.valueOf(data.get(0)));   //音乐类型 要改的
//                            yinyueEntity.setYinyuePhoto("");//详情和图片
//                            yinyueEntity.setYinyueMusic(data.get(0));                    //音乐 要改的
//                            yinyueEntity.setZanNumber(Integer.valueOf(data.get(0)));   //赞 要改的
//                            yinyueEntity.setCaiNumber(Integer.valueOf(data.get(0)));   //踩 要改的
//                            yinyueEntity.setNewsContent("");//详情和图片
//                            yinyueEntity.setInsertTime(date);//时间
//                            yinyueEntity.setCreateTime(date);//时间
                            yinyueList.add(yinyueEntity);


                            //把要查询是否重复的字段放入map中
                                //音乐编号
                                if(seachFields.containsKey("yinyueUuidNumber")){
                                    List<String> yinyueUuidNumber = seachFields.get("yinyueUuidNumber");
                                    yinyueUuidNumber.add(data.get(0));//要改的
                                }else{
                                    List<String> yinyueUuidNumber = new ArrayList<>();
                                    yinyueUuidNumber.add(data.get(0));//要改的
                                    seachFields.put("yinyueUuidNumber",yinyueUuidNumber);
                                }
                        }

                        //查询是否重复
                         //音乐编号
                        List<YinyueEntity> yinyueEntities_yinyueUuidNumber = yinyueService.selectList(new EntityWrapper<YinyueEntity>().in("yinyue_uuid_number", seachFields.get("yinyueUuidNumber")));
                        if(yinyueEntities_yinyueUuidNumber.size() >0 ){
                            ArrayList<String> repeatFields = new ArrayList<>();
                            for(YinyueEntity s:yinyueEntities_yinyueUuidNumber){
                                repeatFields.add(s.getYinyueUuidNumber());
                            }
                            return R.error(511,"数据库的该表中的 [音乐编号] 字段已经存在 存在数据为:"+repeatFields.toString());
                        }
                        yinyueService.insertBatch(yinyueList);
                        return R.ok();
                    }
                }
            }
        }catch (Exception e){
            e.printStackTrace();
            return R.error(511,"批量插入数据异常,请联系管理员");
        }
    }





    /**
    * 前端列表
    */
    @IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));

        // 没有指定排序字段就默认id倒序
        if(StringUtil.isEmpty(String.valueOf(params.get("orderBy")))){
            params.put("orderBy","id");
        }
        PageUtils page = yinyueService.queryPage(params);

        //字典表数据转换
        List<YinyueView> list =(List<YinyueView>)page.getList();
        for(YinyueView c:list)
            dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
        return R.ok().put("data", page);
    }

    /**
    * 前端详情
    */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id, HttpServletRequest request){
        logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        YinyueEntity yinyue = yinyueService.selectById(id);
            if(yinyue !=null){


                //entity转view
                YinyueView view = new YinyueView();
                BeanUtils.copyProperties( yinyue , view );//把实体数据重构到view中

                //修改对应字典表字段
                dictionaryService.dictionaryConvert(view, request);
                return R.ok().put("data", view);
            }else {
                return R.error(511,"查不到数据");
            }
    }


    /**
    * 前端保存
    */
    @RequestMapping("/add")
    public R add(@RequestBody YinyueEntity yinyue, HttpServletRequest request){
        logger.debug("add方法:,,Controller:{},,yinyue:{}",this.getClass().getName(),yinyue.toString());
        Wrapper<YinyueEntity> queryWrapper = new EntityWrapper<YinyueEntity>()
            .eq("yinyue_uuid_number", yinyue.getYinyueUuidNumber())
            .eq("yinyue_name", yinyue.getYinyueName())
            .eq("yinyue_types", yinyue.getYinyueTypes())
            .eq("yinyue_music", yinyue.getYinyueMusic())
            .eq("zan_number", yinyue.getZanNumber())
            .eq("cai_number", yinyue.getCaiNumber())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        YinyueEntity yinyueEntity = yinyueService.selectOne(queryWrapper);
        if(yinyueEntity==null){
            yinyue.setInsertTime(new Date());
            yinyue.setCreateTime(new Date());
        yinyueService.insert(yinyue);
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }


}

论文参考

在这里插入图片描述

目 录
摘 要 I
Abstract II
第1章 绪论 1
1.1 课题研究背景 1
1.2课题研究现状 1
1.3课题实现目的和意义 1
1.4课题实现内容 2
1.5论文结构安排 2
第2章 系统实现的相关技术和环境 3
2.1Java介绍 3
2.2UML建模语言介绍 3
2.3 Html语言介绍 3
2.4Mysql数据库的介绍 3
2.5 SSM框架介绍 4
2.6Vue技术介绍 4
2.7 Idea运行软件介绍 4
第3章 系统分析 7
3.1系统需求分析 7
3.2系统可行性分析 7
3.2.1技术可行性 7
3.2.2经济可行性 7
3.2.3法律可行性 7
3.2.4操作可行性 8
3.3系统性能分析 8
3.4系统功能分析 8
3.5系统流程分析 9
第4章 总体设计 15
4.1系统设计流程分析 15
4.2系统详细设计和设计原则 15
4.3系统的界面设计 15
4.3.1界面设计的原则 15
4.3.2信息输入功能的设计原则 16
4.4系统目标 16
4.5系统功能设计 16
4.6数据库设计 17
4.6.1数据库概念模型 17
4.6.2数据库表设计 20
第5章 系统实现 25
5.1 JAVA与Mysql数据库连接 25
5.2系统用户界面的功能实现 25
5.2.1用户登录功能的实现界面 25
5.2.2 前台界面的实现 26
5.2.3用户注册功能的实现界面 26
5.2.4音乐信息功能的实现界面 27
5.2.5公告信息功能的实现界面 27
5.2.6论坛功能的实现界面 28
5.2.7发表评论功能的实现界面 28
5.3用户中心功能的实现 29
5.3.1个人中心功能的实现 29
5.3.2论坛信息管理功能实现 29
5.3.3公告信息管理功能的实现 30
5.3.4音乐信息管理实现界面 31
5.3.5音乐留言管理功能的实现 31
5.3.6音乐收藏管理功能的实现 32
5.3系统后台管理员功能实现 32
5.3.1音乐信息管理功能的实现界面 32
5.3.2公告信息管理功能的实现界面 32
5.3.3音乐留言管理功能的实现界面 33
5.3.4用户管理功能的实现 33
5.3.5管理员管理功能的实现 34
5.3.6基础数据管理功能的实现界面 34
5.3.7论坛信息管理功能的实现 35
第6章 系统测试 37
6.1测试的目的 37
6.2 测试方案 37
6.3测试任务概述 37
6.4测试项目用例 37
6.4.1准备测试的功能用例 37
6.4.2测试说明 37
6.4.3对数据库进行测试 39
结 论 41
致 谢 43
参考文献 45

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

qq_3306428634

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值