当前位置:   article > 正文

Springboot+vue+小程序+基于微信小程序的在线学习平台

Springboot+vue+小程序+基于微信小程序的在线学习平台

一、项目介绍
  

        基于Spring Boot+Vue+小程序的在线学习平台从实际情况出发,结合当前年轻人的学习环境喜好来开发。基于Spring Boot+Vue+小程序的在线学习平台在语言上使用Java语言进行开发,在数据库存储方面使用的MySQL数据库,开发工具是IDEA。
       功能丰富,项目保证质量,需要可以最底下查看QQ二维码找我私聊。运行讲解服务均可有尝提供,即便你是零基础,也能听懂的优秀讲解老师。
功能:
1.个人中心修改密码里查看个人信息
2.教师管理
3.学生管理
4.课程视频管理
5.课程签到管理
6.课程问题管理
7.课程答题管理
8.答题成绩管理
9.课程类型管理
10.课程资料管理
11.通知信息管理
12.加入课程管理
13.学习论坛管理
14.课程考试管理
15.试题管理
16.系统简介,轮播图,平台公告,关于我们管理
17.考试管理

关键词:商品;购物;Spring Boot框架;MySQL

二、开发环境


开发语言:Java
框架:springboot + vue + 小程序
JDK版本:JDK1.8
数据库:mysql
数据库工具:Navicat11
开发软件:idea/vscode/eclipse
Maven包:Maven

表结构示例:

表名:kechengxinxi

功能:课程信息

字段名称

类型

长度

字段说明

主键

默认值

id

bigint

主键

  主键

addtime

timestamp

创建时间

CURRENT_TIMESTAMP

kechengbianhao

varchar

200

课程编号

kechengmingcheng

varchar

200

课程名称

kechengleixing

varchar

200

课程类型

keshi

varchar

200

课时

xuefen

varchar

200

学分

kechengtupian

longtext

4294967295

课程图片

shangkeshijian

varchar

200

上课时间

shangkedidian

varchar

200

上课地点

jiaoshigonghao

varchar

200

教师工号

jiaoshixingming

varchar

200

教师姓名

kechengjieshao

longtext

4294967295

课程介绍

表名:discusskechengshipin

功能:课程视频评论表

字段名称

类型

长度

字段说明

主键

默认值

id

bigint

主键

  主键

addtime

timestamp

创建时间

CURRENT_TIMESTAMP

refid

bigint

关联表id

userid

bigint

用户id

avatarurl

longtext

4294967295

头像

nickname

varchar

200

用户名

content

longtext

4294967295

评论内容

reply

longtext

4294967295

回复内容

表名:kechengqiandao

功能:课程签到

字段名称

类型

长度

字段说明

主键

默认值

id

bigint

主键

  主键

addtime

timestamp

创建时间

CURRENT_TIMESTAMP

kechengbianhao

varchar

200

课程编号

kechengmingcheng

varchar

200

课程名称

kechengtupian

longtext

4294967295

课程图片

kechengleixing

varchar

200

课程类型

jiaoshigonghao

varchar

200

教师工号

jiaoshixingming

varchar

200

教师姓名

zhangcheng

varchar

200

章程

xuehao

varchar

200

学号

xueshengxingming

varchar

200

学生姓名

xueshengshouji

varchar

200

学生手机

zhuanye

varchar

200

专业

banji

varchar

200

班级

qiandaoshijian

datetime

签到时间

kechengxinde

longtext

4294967295

课程心得

代码示例一,课程信息代码

  1. package com.controller;
  2. import java.text.SimpleDateFormat;
  3. import java.util.Arrays;
  4. import java.util.Calendar;
  5. import java.util.Map;
  6. import java.util.Date;
  7. import javax.servlet.http.HttpServletRequest;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.transaction.annotation.Transactional;
  10. import org.springframework.web.bind.annotation.PathVariable;
  11. import org.springframework.web.bind.annotation.RequestBody;
  12. import org.springframework.web.bind.annotation.RequestMapping;
  13. import org.springframework.web.bind.annotation.RequestParam;
  14. import org.springframework.web.bind.annotation.RestController;
  15. import com.baomidou.mybatisplus.mapper.EntityWrapper;
  16. import com.baomidou.mybatisplus.mapper.Wrapper;
  17. import com.annotation.IgnoreAuth;
  18. import com.entity.KechengxinxiEntity;
  19. import com.entity.view.KechengxinxiView;
  20. import com.service.KechengxinxiService;
  21. import com.utils.PageUtils;
  22. import com.utils.R;
  23. import com.utils.MPUtil;
  24. /**
  25. * 课程信息
  26. * 后端接口
  27. */
  28. @RestController
  29. @RequestMapping("/kechengxinxi")
  30. public class KechengxinxiController {
  31. @Autowired
  32. private KechengxinxiService kechengxinxiService;
  33. /**
  34. * 后端列表
  35. */
  36. @RequestMapping("/page")
  37. public R page(@RequestParam Map<String, Object> params, KechengxinxiEntity kechengxinxi,
  38. HttpServletRequest request) {
  39. String tableName = request.getSession().getAttribute("tableName").toString();
  40. if (tableName.equals("jiaoshi")) {
  41. kechengxinxi.setJiaoshigonghao((String) request.getSession().getAttribute("username"));
  42. }
  43. EntityWrapper<KechengxinxiEntity> ew = new EntityWrapper<KechengxinxiEntity>();
  44. PageUtils page = kechengxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kechengxinxi), params), params));
  45. return R.ok().put("data", page);
  46. }
  47. /**
  48. * 前端列表
  49. */
  50. @IgnoreAuth
  51. @RequestMapping("/list")
  52. public R list(@RequestParam Map<String, Object> params, KechengxinxiEntity kechengxinxi,
  53. HttpServletRequest request) {
  54. EntityWrapper<KechengxinxiEntity> ew = new EntityWrapper<KechengxinxiEntity>();
  55. PageUtils page = kechengxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kechengxinxi), params), params));
  56. return R.ok().put("data", page);
  57. }
  58. /**
  59. * 列表
  60. */
  61. @RequestMapping("/lists")
  62. public R list(KechengxinxiEntity kechengxinxi) {
  63. EntityWrapper<KechengxinxiEntity> ew = new EntityWrapper<KechengxinxiEntity>();
  64. ew.allEq(MPUtil.allEQMapPre(kechengxinxi, "kechengxinxi"));
  65. return R.ok().put("data", kechengxinxiService.selectListView(ew));
  66. }
  67. /**
  68. * 查询
  69. */
  70. @RequestMapping("/query")
  71. public R query(KechengxinxiEntity kechengxinxi) {
  72. EntityWrapper<KechengxinxiEntity> ew = new EntityWrapper<KechengxinxiEntity>();
  73. ew.allEq(MPUtil.allEQMapPre(kechengxinxi, "kechengxinxi"));
  74. KechengxinxiView kechengxinxiView = kechengxinxiService.selectView(ew);
  75. return R.ok("查询课程信息成功").put("data", kechengxinxiView);
  76. }
  77. /**
  78. * 后端详情
  79. */
  80. @RequestMapping("/info/{id}")
  81. public R info(@PathVariable("id") Long id) {
  82. KechengxinxiEntity kechengxinxi = kechengxinxiService.selectById(id);
  83. return R.ok().put("data", kechengxinxi);
  84. }
  85. /**
  86. * 前端详情
  87. */
  88. @IgnoreAuth
  89. @RequestMapping("/detail/{id}")
  90. public R detail(@PathVariable("id") Long id) {
  91. KechengxinxiEntity kechengxinxi = kechengxinxiService.selectById(id);
  92. return R.ok().put("data", kechengxinxi);
  93. }
  94. /**
  95. * 后端保存
  96. */
  97. @RequestMapping("/save")
  98. public R save(@RequestBody KechengxinxiEntity kechengxinxi, HttpServletRequest request) {
  99. kechengxinxi.setId(new Date().getTime() + new Double(Math.floor(Math.random() * 1000)).longValue());
  100. //ValidatorUtils.validateEntity(kechengxinxi);
  101. kechengxinxiService.insert(kechengxinxi);
  102. return R.ok();
  103. }
  104. /**
  105. * 前端保存
  106. */
  107. @RequestMapping("/add")
  108. public R add(@RequestBody KechengxinxiEntity kechengxinxi, HttpServletRequest request) {
  109. kechengxinxi.setId(new Date().getTime() + new Double(Math.floor(Math.random() * 1000)).longValue());
  110. //ValidatorUtils.validateEntity(kechengxinxi);
  111. kechengxinxiService.insert(kechengxinxi);
  112. return R.ok();
  113. }
  114. /**
  115. * 修改
  116. */
  117. @RequestMapping("/update")
  118. @Transactional
  119. public R update(@RequestBody KechengxinxiEntity kechengxinxi, HttpServletRequest request) {
  120. kechengxinxiService.updateById(kechengxinxi);//全部更新
  121. return R.ok();
  122. }
  123. /**
  124. * 删除
  125. */
  126. @RequestMapping("/delete")
  127. public R delete(@RequestBody Long[] ids) {
  128. kechengxinxiService.deleteBatchIds(Arrays.asList(ids));
  129. return R.ok();
  130. }
  131. /**
  132. * 提醒接口
  133. */
  134. @RequestMapping("/remind/{columnName}/{type}")
  135. public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
  136. @PathVariable("type") String type, @RequestParam Map<String, Object> map) {
  137. map.put("column", columnName);
  138. map.put("type", type);
  139. if (type.equals("2")) {
  140. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  141. Calendar c = Calendar.getInstance();
  142. Date remindStartDate = null;
  143. Date remindEndDate = null;
  144. if (map.get("remindstart") != null) {
  145. Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
  146. c.setTime(new Date());
  147. c.add(Calendar.DAY_OF_MONTH, remindStart);
  148. remindStartDate = c.getTime();
  149. map.put("remindstart", sdf.format(remindStartDate));
  150. }
  151. if (map.get("remindend") != null) {
  152. Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
  153. c.setTime(new Date());
  154. c.add(Calendar.DAY_OF_MONTH, remindEnd);
  155. remindEndDate = c.getTime();
  156. map.put("remindend", sdf.format(remindEndDate));
  157. }
  158. }
  159. Wrapper<KechengxinxiEntity> wrapper = new EntityWrapper<KechengxinxiEntity>();
  160. if (map.get("remindstart") != null) {
  161. wrapper.ge(columnName, map.get("remindstart"));
  162. }
  163. if (map.get("remindend") != null) {
  164. wrapper.le(columnName, map.get("remindend"));
  165. }
  166. String tableName = request.getSession().getAttribute("tableName").toString();
  167. if (tableName.equals("jiaoshi")) {
  168. wrapper.eq("jiaoshigonghao", (String) request.getSession().getAttribute("username"));
  169. }
  170. int count = kechengxinxiService.selectCount(wrapper);
  171. return R.ok().put("count", count);
  172. }
  173. }

  1. <template v-if="showFlag">
  2. <el-form class="center-form-pv" :style='{"margin":"0 0 30px"}' :inline="true" :model="searchForm">
  3. <el-row :style='{"padding":"10px","borderRadius":"3px","background":"#fff","display":"block"}'>
  4. <div :style='{"margin":"0 10px 0 0","display":"inline-block"}'>
  5. <label
  6. :style='{"margin":"0 10px 0 0","color":"#666","display":"inline-block","lineHeight":"40px","fontSize":"14px","fontWeight":"500","height":"40px"}'
  7. class="item-label">课程名称</label>
  8. <el-input v-model="searchForm.kechengmingcheng" placeholder="课程名称" clearable></el-input>
  9. </div>
  10. <div :style='{"margin":"0 10px 0 0","display":"inline-block"}' class="select" label="课程类型"
  11. prop="kechengleixing">
  12. <label
  13. :style='{"margin":"0 10px 0 0","color":"#666","display":"inline-block","lineHeight":"40px","fontSize":"14px","fontWeight":"500","height":"40px"}'
  14. class="item-label">课程类型</label>
  15. <el-select @change="kechengleixingChange" clearable v-model="searchForm.kechengleixing"
  16. placeholder="请选择课程类型">
  17. <el-option v-for="(item,index) in kechengleixingOptions" v-bind:key="index" :label="item"
  18. :value="item"></el-option>
  19. </el-select>
  20. </div>
  21. <div :style='{"margin":"0 10px 0 0","display":"inline-block"}'>
  22. <label
  23. :style='{"margin":"0 10px 0 0","color":"#666","display":"inline-block","lineHeight":"40px","fontSize":"14px","fontWeight":"500","height":"40px"}'
  24. class="item-label">教师姓名</label>
  25. <el-input v-model="searchForm.jiaoshixingming" placeholder="教师姓名" clearable></el-input>
  26. </div>
  27. <el-button
  28. :style='{"border":"1px solid #5494cb","cursor":"pointer","padding":"0 34px","outline":"none","margin":"0 0px 0 10px","color":"#fff","borderRadius":"4px","background":"-webkit-linear-gradient(top,#66a4d8,#337ab7)","width":"auto","fontSize":"14px","height":"40px"}'
  29. type="success" @click="search()">查询
  30. </el-button>
  31. </el-row>
  32. <el-row :style='{"margin":"20px 0 20px 0","display":"flex"}'>
  33. <el-button
  34. :style='{"border":"0","cursor":"pointer","padding":"0 24px","margin":"0 10px 0 0","outline":"none","color":"#fff","borderRadius":"4px","background":"rgba(64, 158, 255, 1)","width":"auto","fontSize":"14px","height":"40px"}'
  35. v-if="isAuth('kechengxinxi','新增')" type="success" @click="addOrUpdateHandler()">新增
  36. </el-button>
  37. <el-button
  38. :style='{"border":"0","cursor":"pointer","padding":"0 24px","margin":"0 10px 0 0","outline":"none","color":"#fff","borderRadius":"4px","background":"rgba(255, 0, 0, 1)","width":"auto","fontSize":"14px","height":"40px"}'
  39. v-if="isAuth('kechengxinxi','删除')" :disabled="dataListSelections.length <= 0" type="danger"
  40. @click="deleteHandler()">删除
  41. </el-button>
  42. </el-row>
  43. </el-form>
  44. <!-- <div> -->
  45. <el-table class="tables"
  46. :stripe='false'
  47. :style='{"padding":"0","borderColor":"#eee","borderRadius":"5px","borderWidth":"1px 0 0 1px","background":"#fff","width":"100%","borderStyle":"solid"}'
  48. v-if="isAuth('kechengxinxi','查看')"
  49. :data="dataList"
  50. v-loading="dataListLoading"
  51. @selection-change="selectionChangeHandler">
  52. <el-table-column :resizable='true' type="selection" align="center" width="50"></el-table-column>
  53. <el-table-column :resizable='true' :sortable='false' label="索引" type="index" width="50"/>
  54. <el-table-column :resizable='true' :sortable='false'
  55. prop="kechengbianhao"
  56. label="课程编号">
  57. <template slot-scope="scope">
  58. {{ scope.row.kechengbianhao }}
  59. </template>
  60. </el-table-column>
  61. <el-table-column :resizable='true' :sortable='false'
  62. prop="kechengmingcheng"
  63. label="课程名称">
  64. <template slot-scope="scope">
  65. {{ scope.row.kechengmingcheng }}
  66. </template>
  67. </el-table-column>
  68. <el-table-column :resizable='true' :sortable='false'
  69. prop="kechengleixing"
  70. label="课程类型">
  71. <template slot-scope="scope">
  72. {{ scope.row.kechengleixing }}
  73. </template>
  74. </el-table-column>
  75. <el-table-column :resizable='true' :sortable='false'
  76. prop="keshi"
  77. label="课时">
  78. <template slot-scope="scope">
  79. {{ scope.row.keshi }}
  80. </template>
  81. </el-table-column>
  82. <el-table-column :resizable='true' :sortable='false'
  83. prop="xuefen"
  84. label="学分">
  85. <template slot-scope="scope">
  86. {{ scope.row.xuefen }}
  87. </template>
  88. </el-table-column>
  89. <el-table-column :resizable='true' :sortable='false' prop="kechengtupian" width="200" label="课程图片">
  90. <template slot-scope="scope">
  91. <div v-if="scope.row.kechengtupian">
  92. <img v-if="scope.row.kechengtupian.substring(0,4)=='http'" :src="scope.row.kechengtupian.split(',')[0]"
  93. width="100" height="100">
  94. <img v-else :src="$base.url+scope.row.kechengtupian.split(',')[0]" width="100" height="100">
  95. </div>
  96. <div v-else>无图片</div>
  97. </template>
  98. </el-table-column>
  99. <el-table-column :resizable='true' :sortable='false'
  100. prop="shangkeshijian"
  101. label="上课时间">
  102. <template slot-scope="scope">
  103. {{ scope.row.shangkeshijian }}
  104. </template>
  105. </el-table-column>
  106. <el-table-column :resizable='true' :sortable='false'
  107. prop="shangkedidian"
  108. label="上课地点">
  109. <template slot-scope="scope">
  110. {{ scope.row.shangkedidian }}
  111. </template>
  112. </el-table-column>
  113. <el-table-column :resizable='true' :sortable='false'
  114. prop="jiaoshigonghao"
  115. label="教师工号">
  116. <template slot-scope="scope">
  117. {{ scope.row.jiaoshigonghao }}
  118. </template>
  119. </el-table-column>
  120. <el-table-column :resizable='true' :sortable='false'
  121. prop="jiaoshixingming"
  122. label="教师姓名">
  123. <template slot-scope="scope">
  124. {{ scope.row.jiaoshixingming }}
  125. </template>
  126. </el-table-column>
  127. <el-table-column width="300" label="操作">
  128. <template slot-scope="scope">
  129. <el-button
  130. :style='{"border":"1px solid #3ca512","cursor":"pointer","padding":"0 10px 0 24px","margin":"3px 6px 3px 0","outline":"none","color":"#fff","borderRadius":"4px","background":"url(http://codegen.caihongy.cn/20221011/ca1c191554d24b108bc94f4a2046d636.png) #41b314 no-repeat 5px 8px","width":"auto","fontSize":"12px","height":"32px"}'
  131. v-if=" isAuth('kechengxinxi','查看')" type="success" size="mini"
  132. @click="addOrUpdateHandler(scope.row.id,'info')">详情
  133. </el-button>
  134. <el-button
  135. :style='{"border":"1px solid #3ca512","cursor":"pointer","padding":"0 10px 0 24px","margin":"3px 6px 3px 0","outline":"none","color":"#fff","borderRadius":"4px","background":"url(http://codegen.caihongy.cn/20221011/ca1c191554d24b108bc94f4a2046d636.png) #41b314 no-repeat 5px 8px","width":"auto","fontSize":"12px","height":"32px"}'
  136. v-if="isAuth('kechengxinxi','加入课程')" type="success" size="mini"
  137. @click="jiarukechengCrossAddOrUpdateHandler(scope.row,'cross','','','')">加入课程
  138. </el-button>
  139. <el-button
  140. :style='{"border":"1px solid #3ca512","cursor":"pointer","padding":"0 10px 0 24px","margin":"3px 6px 3px 0","outline":"none","color":"#fff","borderRadius":"4px","background":"url(http://codegen.caihongy.cn/20221011/ca1c191554d24b108bc94f4a2046d636.png) #41b314 no-repeat 5px 8px","width":"auto","fontSize":"12px","height":"32px"}'
  141. v-if="isAuth('kechengxinxi','发布视频')" type="success" size="mini"
  142. @click="kechengshipinCrossAddOrUpdateHandler(scope.row,'cross','','','')">发布视频
  143. </el-button>
  144. <el-button
  145. :style='{"border":"1px solid #3ca512","cursor":"pointer","padding":"0 10px 0 24px","margin":"3px 6px 3px 0","outline":"none","color":"#fff","borderRadius":"4px","background":"url(http://codegen.caihongy.cn/20221011/ca1c191554d24b108bc94f4a2046d636.png) #41b314 no-repeat 5px 8px","width":"auto","fontSize":"12px","height":"32px"}'
  146. v-if="isAuth('kechengxinxi','发布资料')" type="success" size="mini"
  147. @click="kechengziliaoCrossAddOrUpdateHandler(scope.row,'cross','','','')">发布资料
  148. </el-button>
  149. <el-button
  150. :style='{"border":"1px solid #00a0f0","cursor":"pointer","padding":"0 10px 0 24px","margin":"3px 6px 3px 0","outline":"none","color":"#fff","borderRadius":"4px","background":"url(http://codegen.caihongy.cn/20221011/161eb7a46f5d4cd19d68a1386174d662.png) #00aaff no-repeat 5px 8px","width":"auto","fontSize":"12px","height":"32px"}'
  151. v-if=" isAuth('kechengxinxi','修改')" type="primary" size="mini"
  152. @click="addOrUpdateHandler(scope.row.id)">修改
  153. </el-button>
  154. <el-button
  155. :style='{"border":"1px solid #3ca512","cursor":"pointer","padding":"0 10px 0 24px","margin":"3px 6px 3px 0","outline":"none","color":"#fff","borderRadius":"4px","background":"url(http://codegen.caihongy.cn/20221011/ca1c191554d24b108bc94f4a2046d636.png) #41b314 no-repeat 5px 8px","width":"auto","fontSize":"12px","height":"32px"}'
  156. v-if="isAuth('kechengxinxi','查看评论')" type="primary" size="mini"
  157. @click="disscussListHandler(scope.row.id)">查看评论
  158. </el-button>
  159. <el-button
  160. :style='{"border":"0","cursor":"pointer","padding":"0 10px 0 24px","margin":"3px 6px 3px 0","outline":"none","color":"#fff","borderRadius":"4px","background":"url(http://codegen.caihongy.cn/20221011/68bd264a8e4341c6aa5409f871d590d0.png) #d9534f no-repeat 5px 8px","width":"auto","fontSize":"14px","height":"32px"}'
  161. v-if="isAuth('kechengxinxi','删除') " type="danger" size="mini" @click="deleteHandler(scope.row.id)">删除
  162. </el-button>
  163. </template>
  164. </el-table-column>
  165. </el-table>
  166. <el-pagination
  167. @size-change="sizeChangeHandle"
  168. @current-change="currentChangeHandle"
  169. :current-page="pageIndex"
  170. background
  171. :page-sizes="[10, 20, 30, 50]"
  172. :page-size="pageSize"
  173. :layout="layouts.join()"
  174. :total="totalPage"
  175. prev-text="<"
  176. next-text=">"
  177. :hide-on-single-page="true"
  178. :style='{"width":"100%","padding":"0","margin":"20px 0 0","whiteSpace":"nowrap","color":"#333","fontWeight":"500"}'
  179. ></el-pagination>
  180. <!-- </div> -->
  181. </template>

三.关于我的联系方式      

                                

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/522839
推荐阅读
相关标签
  

闽ICP备14008679号