教育培训微信小程序ssm

本文介绍了使用Java和相关前端技术(如JavaScript和VUE.js)开发的Web应用,涵盖了管理员和学生功能的实现,包括教师、网课、学生管理,以及观看进度查看、试卷管理和测试记录等功能的代码示例。

一、技术路线:

开发语言:Java

前端技术:JavaScript、VUE.js(2.X)、css3

数据库:MySQL 5.7

数据库管理工具:Navicat或sqlyog

开发工具:IDEA或Ecplise

二、项目介绍:
https://www.bilibili.com/video/BV1a8411v73j?t=20.2
三、运行截图:

编程人员在搭建的开发环境中,会让各种编程技术一起呈现出最终效果。本节就展示关键部分的页面效果。

3.1 管理员功能实现
3.1.1 教师管理
图3.1 即为编码实现的教师管理界面,教师信息包括手机号,教师姓名,教师性别等信息,管理员可以使用修改功能对有错误信息的教师信息进行更正,需要删除的教师信息也能使用删除功能及时删除。


图3.1 教师管理界面

删除教师:

@RequestMapping("/delete")

public R delete(@RequestBody Integer[] ids){

logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());

ArrayList<JiaoshiEntity> list = new ArrayList<>();

for(Integer id:ids){

JiaoshiEntity jiaoshiEntity = new JiaoshiEntity();

jiaoshiEntity.setId(id);

jiaoshiEntity.setJiaoshiDelete(2);

list.add(jiaoshiEntity);

}

if(list != null && list.size() >0){

jiaoshiService.updateBatchById(list);

}

return R.ok();

}

3.1.2 网课信息管理
图3.2 即为编码实现的网课信息管理界面,网课信息包括网课视频,网课文件,网课标题,网课封面等信息,管理不仅需要上传网课文件,上传网课视频,还可以修改网课信息,可以对需要删除的网课信息进行删除。


图3.2 网课信息管理界面

删除网课:

@RequestMapping("/delete")

public R delete(@RequestBody Integer[] ids){

logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());

kechengService.deleteBatchIds(Arrays.asList(ids));

return R.ok();

}

3.1.3 学生管理
图3.3 即为编码实现的学生管理界面,学生信息包括性别,班级,手机号等信息,学生信息存在登记错误的情况,管理员则可以使用修改功能及时更正,需要删除的学生信息,管理员也能及时删除。


图3.3 学生管理界面

删除学生:

@RequestMapping("/delete")

public R delete(@RequestBody Long[] ids){

usersService.deleteBatchIds(Arrays.asList(ids));

return R.ok();

}

3.2 教师功能实现
3.2.1 观看进度查看
图3.4 即为编码实现的观看进度查看界面,教师可以查看学生对于网课信息的查看进度情况,可以通过学生姓名查询学生对于网课信息的观看进度信息。


图3.4 观看进度查看界面

查看详情:

@RequestMapping("/info/{id}")

public R info(@PathVariable("id") Long id, HttpServletRequest request){

logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);

GuankanjiluEntity guankanjilu = guankanjiluService.selectById(id);

if(guankanjilu !=null){

//entity转view

GuankanjiluView view = new GuankanjiluView();

BeanUtils.copyProperties( guankanjilu , view );//把实体数据重构到view中

//级联表

KechengEntity kecheng = kechengService.selectById(guankanjilu.getKechengId());

if(kecheng != null){

BeanUtils.copyProperties( kecheng , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段

view.setKechengId(kecheng.getId());

}

//级联表

YonghuEntity yonghu = yonghuService.selectById(guankanjilu.getYonghuId());

if(yonghu != null){

BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段

view.setYonghuId(yonghu.getId());

}

//修改对应字典表字段

dictionaryService.dictionaryConvert(view, request);

return R.ok().put("data", view);

}else {

return R.error(511,"查不到数据");

}

}

3.2.2 试卷管理
图3.5 即为编码实现的试卷管理界面,教师可以设置试卷状态为启用或禁用试卷状态,可以修改试卷考试时长信息,以及修改试卷总分信息等,教师也能新增试卷,对之前新增的已经无效的试卷信息及时删除。


图3.5 试卷管理界面

添加试卷:

@RequestMapping("/save")

public R save(@RequestBody ExampaperEntity exampaper, HttpServletRequest request){

logger.debug("save方法:,,Controller:{},,exampaper:{}",this.getClass().getName(),exampaper.toString());

String role = String.valueOf(request.getSession().getAttribute("role"));

if(false)

return R.error(511,"永远不会进入");

else if("教师".equals(role))

exampaper.setJiaoshiId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));

Wrapper<ExampaperEntity> queryWrapper = new EntityWrapper<ExampaperEntity>()

.eq("exampaper_name", exampaper.getExampaperName())

.eq("exampaper_date", exampaper.getExampaperDate())

.eq("exampaper_myscore", exampaper.getExampaperMyscore())

.eq("jiaoshi_id", exampaper.getJiaoshiId())

.eq("exampaper_types", exampaper.getExampaperTypes())

;

logger.info("sql语句:"+
queryWrapper.getSqlSegment());

ExampaperEntity exampaperEntity = exampaperService.selectOne(queryWrapper);

if(exampaperEntity==null){

exampaper.setCreateTime(new Date());

exampaperService.insert(exampaper);

return R.ok();

}else {

return R.error(511,"表中有相同数据");

}

}

3.2.3 试题管理
图3.6 即为编码实现的试题管理界面,所有试卷都是由许多试题组成的,因此教师在组装试卷之前,先要对试题进行添加,以及及时更正登记有错误信息的试题信息,对于不需要的试题信息进行及时删除。


图3.6 试题管理界面

添加试题:

@RequestMapping("/save")

public R save(@RequestBody ExamquestionEntity examquestion, HttpServletRequest request){

logger.debug("save方法:,,Controller:{},,examquestion:{}",this.getClass().getName(),examquestion.toString());

String role = String.valueOf(request.getSession().getAttribute("role"));

if(false)

return R.error(511,"永远不会进入");

Wrapper<ExamquestionEntity> queryWrapper = new EntityWrapper<ExamquestionEntity>()

.eq("exampaper_id", examquestion.getExampaperId())

.eq("examquestion_name", examquestion.getExamquestionName())

.eq("examquestion_options", examquestion.getExamquestionOptions())

.eq("examquestion_score", examquestion.getExamquestionScore())

.eq("examquestion_types", examquestion.getExamquestionTypes())

.eq("examquestion_sequence", examquestion.getExamquestionSequence())

;

logger.info("sql语句:"+
queryWrapper.getSqlSegment());

ExamquestionEntity examquestionEntity = examquestionService.selectOne(queryWrapper);

if(examquestionEntity==null){

examquestion.setCreateTime(new Date());

examquestionService.insert(examquestion);

return R.ok();

}else {

return R.error(511,"表中有相同数据");

}

}

3.3 学生功能实现
3.3.1 在线答题
图3.7 即为编码实现的在线答题界面,学生在试卷模块对需要答题的试卷进行答题,答题过程中不仅需要回答试题问题,还需要在试卷规定时间内提交答卷。


图3.7 在线答题界面

3.3.2 网课信息
图3.8 即为编码实现的网课信息界面,学生在网课信息界面中可以通过播放网课视频的方式进行学习,同时,该网课信息界面也展示了网课文件,学生可以下载网课文件。


图3.8 网课信息界面

3.3.3 我的发帖
图3.9 即为编码实现的我的发帖界面,学生在我的发帖界面中可以发布帖子,该界面展示的帖子都是学生自己发布的帖子,因此支持学生对帖子进行更改,删除。同时学生也能跟踪已发布的帖子,比如查看帖子的评论,学生也能回复帖子等。


图3.9 我的发帖界面

发帖:

@RequestMapping("/add")

public R add(@RequestBody ForumEntity forum, HttpServletRequest request){

logger.debug("add方法:,,Controller:{},,forum:{}",this.getClass().getName(),forum.toString());

Wrapper<ForumEntity> queryWrapper = new EntityWrapper<ForumEntity>()

.eq("forum_name", forum.getForumName())

.eq("yonghu_id", forum.getYonghuId())

.eq("jiaoshi_id", forum.getJiaoshiId())

.eq("users_id", forum.getUsersId())

.eq("super_ids", forum.getSuperIds())

.eq("forum_state_types", forum.getForumStateTypes())

;

logger.info("sql语句:"+
queryWrapper.getSqlSegment());

ForumEntity forumEntity = forumService.selectOne(queryWrapper);

if(forumEntity==null){

forum.setInsertTime(new Date());

forum.setCreateTime(new Date());

forumService.insert(forum);

return R.ok();

}else {

return R.error(511,"表中有相同数据");

}

}

3.3.4 测试记录
图3.10 即为编码实现的测试记录界面,测试记录界面展示的信息都是学生对试卷答题产生的信息,学生不仅可以查看试卷答题的详细信息,包括试卷每道题的得分信息,以及学生对试题提交的答案信息等,除此以外,学生也能查看试卷的总体得分信息。


图3.10 测试记录界面

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值