Java毕业设计-基于SSM框架的云端学习系统项目实战(附源码+论文)

大家好!我是岛上程序猿,感谢您阅读本文,欢迎一键三连哦。

💞当前专栏:Java毕业设计

精彩专栏推荐👇🏻👇🏻👇🏻

🎀 Python毕业设计
🌎微信小程序毕业设计

开发运行环境

  • 框架:ssm
  • JDK版本:JDK1.8
  • 服务器:tomcat7
  • 数据库:mysql 5.7
  • 数据库工具:Navicat12
  • 开发软件:eclipse/myeclipse/idea
  • Maven包:Maven3.3.9
  • 浏览器:谷歌浏览器

源码下载地址:

https://download.csdn.net/download/m0_46388260/89282112

论文目录

【如需全文请按文末获取联系】

在这里插入图片描述
在这里插入图片描述

一、项目简介

云端学习系统在Eclipse环境中,使用Java语言进行编码,使用Mysql创建数据表保存本系统产生的数据。系统可以提供信息显示和相应服务,其管理员管理课程,学习课件,学习视频以及论坛信息。用户收藏课程,下载学习课件,播放学习视频,查看论坛里面的帖子以及回帖信息。

二、系统设计

2.1软件功能模块设计

在前面分析的管理员功能的基础上,进行接下来的设计工作,最终展示设计的管理员结构图(见下图)。管理员管理课程,学习课件,学习视频以及论坛信息。
在这里插入图片描述
在前面分析的用户功能的基础上,进行接下来的设计工作,最终展示设计的用户结构图(见下图)。用户收藏课程,下载学习课件,播放学习视频,查看论坛里面的帖子以及回帖信息。
在这里插入图片描述

2.2数据库设计

(1)下图是用户实体和其具备的属性。
在这里插入图片描述
(2)下图是学习课件实体和其具备的属性。
在这里插入图片描述
(3)下图是学习视频实体和其具备的属性。
在这里插入图片描述
(5)下图为上述各实体间相互之间的关系。
在这里插入图片描述

三、系统项目部分截图

3.1管理员功能实现

用户管理
管理员进入指定功能操作区之后可以管理用户。其页面见下图。用户的基本资料也需要管理员负责修改与删除等操作。
在这里插入图片描述
课程信息管理
管理员进入指定功能操作区之后可以管理课程信息。其页面见下图。管理员负责修改课程信息,可以批量删除课程信息。
在这里插入图片描述
学习课件管理
管理员进入指定功能操作区之后可以管理学习课件。其页面见下图。管理员提交课件标题可以获取学习课件,在当前页面管理员也能修改学习课件,下载学习课件。
在这里插入图片描述

3.2用户功能实现

课程信息
用户进入指定功能操作区之后可以查看课程信息。其页面见下图。用户在本页面收藏课程,对该页面显示的课程发布留言。
在这里插入图片描述
学习课件
用户进入指定功能操作区之后可以查看学习课件。其页面见下图。用户收藏学习课件,在当前页面可以下载学习课件。
在这里插入图片描述
学习视频
用户进入指定功能操作区之后可以查看学习视频。其页面见下图。用户播放学习视频,能够收藏本页面显示的学习视频。
在这里插入图片描述

四、部分核心代码

package com.controller;


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.StringUtil;
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.KejianEntity;

import com.service.KejianService;
import com.entity.view.KejianView;

import com.utils.PageUtils;
import com.utils.R;

/**
 * 学习课件
 * 后端接口
 * @author
 * @email
 * @date 2021-05-03
*/
@RestController
@Controller
@RequestMapping("/kejian")
public class KejianController {
    private static final Logger logger = LoggerFactory.getLogger(KejianController.class);

    @Autowired
    private KejianService kejianService;


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



    //级联表service


    /**
    * 后端列表
    */
    @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(StringUtil.isNotEmpty(role) && "用户".equals(role)){
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        }
        params.put("orderBy","id");
        PageUtils page = kejianService.queryPage(params);

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

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

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

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody KejianEntity kejian, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,kejian:{}",this.getClass().getName(),kejian.toString());
        Wrapper<KejianEntity> queryWrapper = new EntityWrapper<KejianEntity>()
            .eq("kejian_name", kejian.getKejianName())
            .eq("kejian_types", kejian.getKejianTypes())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        KejianEntity kejianEntity = kejianService.selectOne(queryWrapper);
        if(kejianEntity==null){
            kejian.setInsertTime(new Date());
            kejian.setCreateTime(new Date());
        //  String role = String.valueOf(request.getSession().getAttribute("role"));
        //  if("".equals(role)){
        //      kejian.set
        //  }
            kejianService.insert(kejian);
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody KejianEntity kejian, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,kejian:{}",this.getClass().getName(),kejian.toString());
        //根据字段查询是否有相同数据
        Wrapper<KejianEntity> queryWrapper = new EntityWrapper<KejianEntity>()
            .notIn("id",kejian.getId())
            .andNew()
            .eq("kejian_name", kejian.getKejianName())
            .eq("kejian_types", kejian.getKejianTypes())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        KejianEntity kejianEntity = kejianService.selectOne(queryWrapper);
        if("".equals(kejian.getKejianPhoto()) || "null".equals(kejian.getKejianPhoto())){
                kejian.setKejianPhoto(null);
        }
        if("".equals(kejian.getKejianFile()) || "null".equals(kejian.getKejianFile())){
                kejian.setKejianFile(null);
        }
        if(kejianEntity==null){
            //  String role = String.valueOf(request.getSession().getAttribute("role"));
            //  if("".equals(role)){
            //      kejian.set
            //  }
            kejianService.updateById(kejian);//根据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());
        kejianService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }



    /**
    * 前端列表
    */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        }
        // 没有指定排序字段就默认id倒序
        if(StringUtil.isEmpty(String.valueOf(params.get("orderBy")))){
            params.put("orderBy","id");
        }
        PageUtils page = kejianService.queryPage(params);

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

    /**
    * 前端详情
    */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        KejianEntity kejian = kejianService.selectById(id);
            if(kejian !=null){
                //entity转view
        KejianView view = new KejianView();
                BeanUtils.copyProperties( kejian , view );//把实体数据重构到view中

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


    /**
    * 前端保存
    */
    @RequestMapping("/add")
    public R add(@RequestBody KejianEntity kejian, HttpServletRequest request){
        logger.debug("add方法:,,Controller:{},,kejian:{}",this.getClass().getName(),kejian.toString());
        Wrapper<KejianEntity> queryWrapper = new EntityWrapper<KejianEntity>()
            .eq("kejian_name", kejian.getKejianName())
            .eq("kejian_types", kejian.getKejianTypes())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
    KejianEntity kejianEntity = kejianService.selectOne(queryWrapper);
        if(kejianEntity==null){
            kejian.setInsertTime(new Date());
            kejian.setCreateTime(new Date());
        //  String role = String.valueOf(request.getSession().getAttribute("role"));
        //  if("".equals(role)){
        //      kejian.set
        //  }
        kejianService.insert(kejian);
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }





}


获取源码或论文

如需对应的论文或源码,以及其他定制需求,也可以下方微信联系我。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值