基于javaweb的SSM+Maven网上选课管理系统(java+elementui+vue+ssm+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8、Node.js≥14

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可

❗没学过node.js的不要搞前后端分离项目

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

112323441806

112323441807

122323441807

132323441807

142323441807

152323441807

172323441807

基于javaweb的SSM+Maven网上选课管理系统(java+elementui+vue+ssm+mysql)

1
2
3
4
5
6
7
8
9
管理员:
admin 123456

学生
学号1 123456
学号2 123456

老师:
教师工号1 123456

项目介绍

基于SSM的网上选课系统

角色:管理员、学生、老师

学生:课程浏览、收藏、课程信息、公告信息、论坛、留言板、个人中心、选课、搜索

教师:首页、个人中心、修改密码、个人信息、课程信息管理、课程信息列表、学生成绩管理、学生成绩列表、 选课信息管理、选课信息列表、学院信息管理、学院信息列表 专业信息管理、班级信息管理、我的收藏管理

管理员 :首页、个人中心、修改密码、个人信息、教师信息管理、教师信息列表、学生信息管理、学生信息列表、 课程信息管理、课程信息列表、选课信息管理、学生成绩管理、公告信息管理、学院信息管理、专业信息管理、班级信息管理 论坛管理

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;  4.数据库:MySql 5.7/8.0版本均可; 5.是否Maven项目:是;

技术栈

后端:SSM(Spring+SpringMVC+Mybatis) 前端:ElementUI+Vue

使用说明

项目运行: 1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;  

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
			if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}

Wrapper<XueshengchengjiEntity> wrapper = new EntityWrapper<XueshengchengjiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}

String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xueshengxinxi")) {
wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));
}

int count = xueshengchengjiService.selectCount(wrapper);
return R.ok().put("count", count);
}

}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39


/**
* 通用接口
*/
@RestController
public class CommonController{
@Autowired
private CommonService commonService;

@Autowired
private ConfigService configService;

private static AipFace client = null;

private static String BAIDU_DITU_AK = null;

@RequestMapping("/location")
public R location(String lng,String lat) {
if(BAIDU_DITU_AK==null) {
BAIDU_DITU_AK = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "baidu_ditu_ak")).getValue();
if(BAIDU_DITU_AK==null) {
return R.error("请在配置管理中正确配置baidu_ditu_ak");
}
}
Map<String, String> map = BaiduUtil.getCityByLonLat(BAIDU_DITU_AK, lng, lat);
return R.ok().put("data", map);
}

/**
* 人脸比对
*
* @param face1 人脸1
* @param face2 人脸2
* @return
*/
@RequestMapping("/matchFace")
public R matchFace(String face1, String face2,HttpServletRequest request) {
if(client==null) {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
   public R register(@RequestBody JiaoshixinxiEntity jiaoshixinxi){
//ValidatorUtils.validateEntity(jiaoshixinxi);
JiaoshixinxiEntity user = jiaoshixinxiService.selectOne(new EntityWrapper<JiaoshixinxiEntity>().eq("gonghao", jiaoshixinxi.getGonghao()));
if(user!=null) {
return R.error("注册用户已存在");
}
jiaoshixinxi.setId(new Date().getTime());
jiaoshixinxiService.insert(jiaoshixinxi);
return R.ok();
}

/**
* 退出
*/
@RequestMapping("/logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}

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

/**
* 密码重置
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
JiaoshixinxiEntity user = jiaoshixinxiService.selectOne(new EntityWrapper<JiaoshixinxiEntity>().eq("gonghao", username));
if(user==null) {
return R.error("账号不存在");
}
user.setMima("123456");
jiaoshixinxiService.updateById(user);
return R.ok("密码已重置为:123456");
}

/**
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25


/**
* 登录相关
*/
@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("账号或密码不正确");
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
       return R.ok().put("data", user);
}

/**
* 密码重置
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
XueshengxinxiEntity user = xueshengxinxiService.selectOne(new EntityWrapper<XueshengxinxiEntity>().eq("xuehao", username));
if(user==null) {
return R.error("账号不存在");
}
user.setMima("123456");
xueshengxinxiService.updateById(user);
return R.ok("密码已重置为:123456");
}

/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,XueshengxinxiEntity xueshengxinxi, HttpServletRequest request){

EntityWrapper<XueshengxinxiEntity> ew = new EntityWrapper<XueshengxinxiEntity>();
PageUtils page = xueshengxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xueshengxinxi), params), params));
return R.ok().put("data", page);
}

/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,XueshengxinxiEntity xueshengxinxi, HttpServletRequest request){
EntityWrapper<XueshengxinxiEntity> ew = new EntityWrapper<XueshengxinxiEntity>();
PageUtils page = xueshengxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xueshengxinxi), params), params));
return R.ok().put("data", page);
}

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

/**
* 查询
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
       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));
}


项目链接:
https://javayms.github.io?id=320023061907201bo
https://javayms.pages.dev?id=320023061907201bo