基于SSM+Vue的少儿编程网上报名系统

news2025/2/2 3:53:49

末尾获取源码
开发语言:Java
Java开发工具:JDK1.8
后端框架:SSM
前端:Vue
数据库:MySQL5.7和Navicat管理工具结合
服务器:Tomcat8.5
开发软件:IDEA / Eclipse
是否Maven项目:是


目录

一、项目简介

二、系统功能需求分析

(1)前台首页功能需求

(2)管理员功能需求

(3)用户功能需求

三、系统项目截图

3.1管理员

3.2用户

3.3前台首页

四、核心代码

4.1登录相关

4.2文件上传

4.3封装


一、项目简介

在国家重视教育影响下,教育部门的密确配合下,对教育进行改革、多样性、质量等等的要求,使教育系统的管理和运营比过去十年前更加理性化。依照这一现实为基础,设计一个快捷而又方便的网上少儿编程网上报名系统是一项十分重要并且有价值的事情。对于传统的少儿编程网上报名系统控制模型来说,少儿编程网上报名系统具有许多不可比拟的优势,首先是快速更新少儿编程网上报名系统的信息,其次是大量信息的管理,最后是高度安全,以及使用简单等特性,这使得少儿编程网上报名系统的管理和运营非常方便。

少儿编程网上报名系统的开发过程中,采用B / S架构,主要使用java技术进行开发,中间件服务器是Tomcat服务器,使用Mysql数据库和Eclipse开发环境。该少儿编程网上报名系统包括用户和管理员。其主要功能包括管理员:首页、个人中心、用户管理、课程类型管理、课程信息管理、课程购买管理、退课管理、课程评价管理、留言板管理、系统管理,用户:首页、个人中心、课程购买管理、退课管理、课程评价管理、我的收藏管理,前台首页;首页、课程信息、课程资讯、留言反馈、个人中心、后台管理等功能。

本论文对少儿编程网上报名系统的发展背景进行详细的介绍,并且对系统开发技术进行介绍,然后对系统进行需求分析,对少儿编程网上报名系统业务流程、系统结构以及数据都进行详细说明。用户可根据关键字进行信息的查找自己想要的课程信息等。


二、系统功能需求分析

任务需求分析是每个系统开发设计必不可少的一部分,系统质量的好坏可以直接影响系统的存活问题,所以我们必须要将任务需求分析做到位,少儿编程网上报名系统的设计在初期的分析是尤为重要的,通过任务分析可以更顺利的进行系统设计,并且保证了用户的满意度。

1)前台首页功能需求

前台首页进入系统可以查看首页、课程信息、课程资讯、留言反馈、个人中心、后台管理等操作。前台首页用例图如图所示。

2)管理员功能需求

管理员登陆后,主要功能模块包括首页、个人中心、用户管理、课程类型管理、课程信息管理、课程购买管理、退课管理、课程评价管理、留言板管理、系统管理等功能。管理员用例图如图所示。

3)用户功能需求

用户登陆后,主要功能模块包括首页、个人中心、课程购买管理、退课管理、课程评价管理、我的收藏管理等功能。用户用例图如图所示。



三、系统项目截图

3.1管理员

管理员登录,通过填写注册时输入的用户名、密码、角色进行登录

管理员登录进入少儿编程网上报名系统可以查看管理员:首页、个人中心、用户管理、课程类型管理、课程信息管理、课程购买管理、退课管理、课程评价管理、留言板管理、系统管理等信息

 

用户管理,在用户管理列表可以查看用户名、密码、姓名、性别、头像、联系电话

等内容,还可以根据需要修改或删除等操作

 

课程信息管理,在课程信息管理列表可以查看课程编号、课程名称、课程类型、课时、图片、价格等信息,并可根据需要进行修改或删除等操作

 

轮播图;该页面为轮播图管理界面。管理员可以在此页面进行首页轮播图的管理,通过新建操作可在轮播图中加入新的图片,还可以对以上传的图片进行修改操作,以及图片的删除操作

 

课程购买管理,在课程购买管理列表可以查看订单编号、课程编号、课程名称、价格、数量、总金额、购买日期、备注、用户名、姓名、是否支付等内容,并且根据需要进行修改或删除等操作

 

退课管理,在退课管理列表可以查看订单编号、课程名称、课程类型、价格、数量、总金额、退课日期、退课说明、用户名、姓名、审核回复、审核等内容,并且根据需要进行修改、删除操作

 

课程评价管理,在课程评价管理列表可以查看订单编号、课程名称、用户评分、评价内容、晒图、评价日期、用户名等内容,并且根据需要进行修改或删除等操作

3.2用户

用户登录进入少儿编程网上报名系统可以查看首页、个人中心、课程购买管理、退课管理、课程评价管理、我的收藏管理等内容

课程购买管理,在课程购买管理列表可以查看用订单编号、课程编号、课程名称、价格、数量、总金额、购买日期、备注、用户名、姓名、是否支付等内容,并且根据需要进行查看、删除等操作

课程评价管理,在课程评价管理列表可以查看订单编号、课程名称、用户评分、评价内容、晒图、评价日期、用户名等内容,并且根据需要进行查看、删除等操作

我的收藏管理,在我的收藏管理列表可以查看收藏ID、表名、收藏名称、收藏图片等内容,并且根据需要进行查看、删除等操作

3.3前台首页

少儿编程网上报名系统在前台首页可以查看首页、课程信息、课程资讯、留言反馈、个人中心、后台管理等内容

登录、注册,在注册列表中通过填写用户名、密码、姓名、联系电话等信息进行注册、登录

课程信息,在课程信息可以填写课程名称、课程编号、课程类型、课时、价格等信息内容,并且根据需要进行购买操作

课程资讯,在课程资讯列表中通过填写新课程上线等信息进行查看

留言反馈,在留言反馈列表中通过填写留言内容等信息立即提交


四、核心代码

4.1登录相关


package com.controller;


import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;

/**
 * 登录相关
 */
@RequestMapping("users")
@RestController
public class UserController{
	
	@Autowired
	private UserService userService;
	
	@Autowired
	private TokenService tokenService;

	/**
	 * 登录
	 */
	@IgnoreAuth
	@PostMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
		if(user==null || !user.getPassword().equals(password)) {
			return R.error("账号或密码不正确");
		}
		String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
		return R.ok().put("token", token);
	}
	
	/**
	 * 注册
	 */
	@IgnoreAuth
	@PostMapping(value = "/register")
	public R register(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);
    	if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {
    		return R.error("用户已存在");
    	}
        userService.insert(user);
        return R.ok();
    }

	/**
	 * 退出
	 */
	@GetMapping(value = "logout")
	public R logout(HttpServletRequest request) {
		request.getSession().invalidate();
		return R.ok("退出成功");
	}
	
	/**
     * 密码重置
     */
    @IgnoreAuth
	@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
    	UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
    	if(user==null) {
    		return R.error("账号不存在");
    	}
    	user.setPassword("123456");
        userService.update(user,null);
        return R.ok("密码已重置为:123456");
    }
	
	/**
     * 列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,UserEntity user){
        EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
    	PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/list")
    public R list( UserEntity user){
       	EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
      	ew.allEq(MPUtil.allEQMapPre( user, "user")); 
        return R.ok().put("data", userService.selectListView(ew));
    }

    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") String id){
        UserEntity user = userService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * 获取用户的session用户信息
     */
    @RequestMapping("/session")
    public R getCurrUser(HttpServletRequest request){
    	Long id = (Long)request.getSession().getAttribute("userId");
        UserEntity user = userService.selectById(id);
        return R.ok().put("data", user);
    }

    /**
     * 保存
     */
    @PostMapping("/save")
    public R save(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);
    	if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {
    		return R.error("用户已存在");
    	}
        userService.insert(user);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);
        userService.updateById(user);//全部更新
        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        userService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
}

4.2文件上传

package com.controller;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;

/**
 * 上传文件映射表
 */
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
	@Autowired
    private ConfigService configService;
	/**
	 * 上传文件
	 */
	@RequestMapping("/upload")
	public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
		if (file.isEmpty()) {
			throw new EIException("上传文件不能为空");
		}
		String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
		File path = new File(ResourceUtils.getURL("classpath:static").getPath());
		if(!path.exists()) {
		    path = new File("");
		}
		File upload = new File(path.getAbsolutePath(),"/upload/");
		if(!upload.exists()) {
		    upload.mkdirs();
		}
		String fileName = new Date().getTime()+"."+fileExt;
		File dest = new File(upload.getAbsolutePath()+"/"+fileName);
		file.transferTo(dest);
		FileUtils.copyFile(dest, new File("C:\\Users\\Desktop\\jiadian\\springbootl7own\\src\\main\\resources\\static\\upload"+"/"+fileName));
		if(StringUtils.isNotBlank(type) && type.equals("1")) {
			ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
			if(configEntity==null) {
				configEntity = new ConfigEntity();
				configEntity.setName("faceFile");
				configEntity.setValue(fileName);
			} else {
				configEntity.setValue(fileName);
			}
			configService.insertOrUpdate(configEntity);
		}
		return R.ok().put("file", fileName);
	}
	
	/**
	 * 下载文件
	 */
	@IgnoreAuth
	@RequestMapping("/download")
	public ResponseEntity<byte[]> download(@RequestParam String fileName) {
		try {
			File path = new File(ResourceUtils.getURL("classpath:static").getPath());
			if(!path.exists()) {
			    path = new File("");
			}
			File upload = new File(path.getAbsolutePath(),"/upload/");
			if(!upload.exists()) {
			    upload.mkdirs();
			}
			File file = new File(upload.getAbsolutePath()+"/"+fileName);
			if(file.exists()){
				/*if(!fileService.canRead(file, SessionManager.getSessionUser())){
					getResponse().sendError(403);
				}*/
				HttpHeaders headers = new HttpHeaders();
			    headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    
			    headers.setContentDispositionFormData("attachment", fileName);    
			    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
	}
	
}

4.3封装

package com.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * 返回数据
 */
public class R extends HashMap<String, Object> {
	private static final long serialVersionUID = 1L;
	
	public R() {
		put("code", 0);
	}
	
	public static R error() {
		return error(500, "未知异常,请联系管理员");
	}
	
	public static R error(String msg) {
		return error(500, msg);
	}
	
	public static R error(int code, String msg) {
		R r = new R();
		r.put("code", code);
		r.put("msg", msg);
		return r;
	}

	public static R ok(String msg) {
		R r = new R();
		r.put("msg", msg);
		return r;
	}
	
	public static R ok(Map<String, Object> map) {
		R r = new R();
		r.putAll(map);
		return r;
	}
	
	public static R ok() {
		return new R();
	}

	public R put(String key, Object value) {
		super.put(key, value);
		return this;
	}
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/762644.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

vue复习

1.mustache动态插值 <html lang"en"> <head><meta charset"UTF-8"><meta http-equiv"X-UA-Compatible" content"IEedge"><meta name"viewport" content"widthdevice-width, initial-scale…

刚入暑假,开学季产品销量已抬头

随着入伏&#xff0c;气温进入一年当中最热的阶段&#xff0c;倏忽间&#xff0c;孩子们进入酣畅淋漓的暑假模式已经两周多了&#xff0c;游戏、雪糕和旅行可能都已经尝试过了&#xff0c;或是正在进行&#xff0c;然而&#xff0c;这些都不影响开学季产品如期增长的势头。加上…

智能ai绘画软件帮你用科技点亮创意火花

李明&#xff1a;嘿&#xff0c;你听说过ai绘画软件吗&#xff1f;我最近对数字艺术产生了浓厚的兴趣 王磊&#xff1a;当然&#xff01;ai绘画软件真是太神奇了&#xff01;它可以将抽象的文字描述转换成惊人的艺术作品。 李明&#xff1a;是吗&#xff1f;它们绘制的效果怎…

排序算法的补充

建议先去看看我之前写的基础排序算法 补充一&#xff1a;快排中partition函数的三种实现形式 1.hoare法---与第2种方法类似 int Partition1(int*a,int left,int right) {int keyi left;while (left < right) {while (left < right && a[right] > a[keyi])…

pytest+yaml接口自动化测试框架封装

1. 框架封装基础 以下是框架封装的技术基础&#xff0c;打好这些基础的话&#xff0c;能够很轻松地封装出来框架 对于基础还有欠缺的话&#xff0c;建议针对性精进&#xff1a; 1. 扎实的Python语言基础 函数、类文件读写处理报错数据结构标准库测试框架库&#xff08;unit…

goland设置内置命令行为当前项目环境

goland设置内置的命令行为当前项目环境 修改 GoLand 中的 SSH 终端配置即可

125、仿真-基于51单片机的自行车电动车或者电机数码管控制系统设计(Proteus仿真+程序+原理图+配套资料等)

方案选择 单片机的选择 方案一&#xff1a;STM32系列单片机控制&#xff0c;该型号单片机为LQFP44封装&#xff0c;内部资源足够用于本次设计。STM32F103系列芯片最高工作频率可达72MHZ&#xff0c;在存储器的01等等待周期仿真时可达到1.25Mip/MHZ(Dhrystone2.1)。内部128k字节…

linux守护进程介绍 | Linux的热拔插UDEV机制

简介 udev是一个设备管理工具&#xff0c;udev以守护进程的形式运行&#xff0c;通过侦听内核发出来的uevent来管 理/dev目录下的设备文件。udev在用户空间运行&#xff0c;而不在内核空间 运行。它能够根据系统中的硬 件设备的状态动态更新设备文件&#xff0c;包括设备文件的…

详解Single-Shot Alignment Network (S2A-Net) ,详解AlignConv,基于遥感图像的特征对齐旋转目标检测

引言 目标检测&#xff1a;把图像中的物体使用方框标记起来&#xff0c;不同类别物体应使用不同颜色 目标检测其实是寻找物体边界框(bounding box)回归问题(regression)和对物体分类问题(classification)的统一 遥感目标检测&#xff1a;普通的目标检测是日常生活中的横向的图…

JavasScript基础第一部分

此文章&#xff0c;来源于印客学院的资料&#xff0c;然后补充的。 此文档不一定涵盖了所有知识点&#xff0c;只是一个大概方向&#xff0c;仅供参考。 也算一个查漏补缺&#xff0c;诸君可以根据自己实际情况&#xff0c;自行衡量&#xff0c;看看哪里需要补充。 JavaScri…

【CentOS安装make】

问题&#xff1a; bash: make: command not found 1、去官网查找最新版本 http://ftp.gnu.org/pub/gnu/make/ 查找最新安装包 2、下载解压缩 wget http://ftp.gnu.org/pub/gnu/make/make-4.2.tar.gz tar -zxvf make-4.2.tar.gz cd make-4.2mkdir buildcd build../configure…

度量学习和表征学习

度量学习 定义 计算特征之间的距离&#xff08;特征之间相乘&#xff09;&#xff0c;通过距离损失优化模型——>度量距离相关的损失函数 图片出自《【极市】张宇涵-CVPR2020 Oral&#xff5c;Circle Loss&#xff0c;从统一视角提升深度特征学习能力_哔哩哔哩_bilibili》…

短视频矩阵系统源码搭建--附赠代码

说明&#xff1a;本开发文档适用于短视频矩阵系统源码开发搭建&#xff0c;短视频seo矩阵源码开发搭建&#xff0c;抖音短视频seo源码开发搭建&#xff0c;抖音矩阵系统源码开发搭建等SaaS类产品开发场景。 短视频矩阵系统开发围绕的开发核心维度&#xff1a; 1. 多账号原理开…

shell脚本定时删除大小超200M的日志文件

需求 某个服务器的日志文件随着时间的增长越来越多&#xff0c;我不想自己一个个的删除&#xff0c;但是不删除的话&#xff0c;会很麻烦&#xff0c;万一因为日志文件导致内存满了就麻烦了&#xff01; 实现步骤 1、写好实现的脚本 我要查找>200M的日志文件 find / -typ…

苹果平板电容笔好用吗?第三方apple pencil推荐

自从苹果推出了ipad的电容笔之后&#xff0c;一直在市场上保持着十分火爆的热度&#xff0c;但是因为Apple Pencil的价格太高&#xff0c;一般的消费者根本没有足够预算去入手。所以市场上就不断涌现出了不少可以很好代替Apple Pencil的平替电容笔&#xff0c;并且深受人们的热…

BTY Ecosystem DNS‘s Ideas of DeSoc

In May 2022, Ethereum founder Vitalik Buterin, economist Glen Weyl and Flashbots researcher Puja Ohlhaver jointly released “Decentralized Society: Finding Web3s Soul”. The core idea of this paper is the possibility of creating a decentralized society aro…

数据结构与算法基础(青岛大学-王卓)(6)

啊呀呀&#xff0c;不小心又断更快一个月了&#xff0c;我还是认真每天学习滴&#xff0c;最近还是香瓜&#xff0c;菜瓜&#xff0c;西瓜&#xff0c;羊角蜜不能停口啊&#xff0c;哈哈&#xff0c;二叉树这一章真是硬茬&#xff0c;难啃啊。 文章目录 [toc]树和二叉树树的定义…

linux扩大原磁盘后,扩大lvm空间

需求背景 原centos7虚机是将一块裸盘&#xff08;未分区&#xff09;通过lvm的方式挂载到/data目录下&#xff0c;现因业务需要&#xff0c;需要增加/data目录的磁盘空间&#xff0c;现在虚机管理平台上将原磁盘增加20G空间。 注意&#xff1a;如果是新增加一个磁盘&#xff…

二十、移动端网页开发-px 和 vw基础知识

目录&#xff1a; 1. 基础准备 2. vw 详解 一、基础准备 1. 观察你的html里面有没有meta完美视口设置&#xff0c;如果有&#xff0c;就不用再管&#xff0c;如果没有&#xff0c;就加上。 <head><meta charset"UTF-8"><meta http-equiv"X-UA-C…

Fiddler抓包app(方便后端定位app调用的是那个接口?参数为何?)

一、抓http请求的包 1、设置Fiddler允许远程连接 选择Tools->Options 选择Connections选项卡&#xff0c;选中允许远程连接&#xff0c;如图所示 2、手机与电脑连接相同的wlan网络 3、手机wlan设置手动代理&#xff0c; 1&#xff09;手动代理的主机名设为电脑ip&…