一个月爆肝一个基于SpringBoot的在线教育系统「源码开源」
1. 技术介绍[*]核心技术:SpringBoot+mybatis;
[*]前端:layui;
[*]开发工具:idea;
[*]数据库:mysql5.7;
[*]模版引擎:thymeleaf;
[*]安全框架:SpringSecurity;
[*]日志框架:logback;
[*]数据库连接池:druid;
[*]在线编辑器:ckeditor;
[*]图片轮播组件:jQuerySwipeslider;
2.功能介绍
本项目分前台用户界面功能和后台管理功能;
[*]前台用户界面功能:
[*]滚动大条幅展示重要通知和课程或者活动;
[*]展示课程,根据现实业务需求,展示课程推荐,最新课程,免费课程,实战课程;
[*]课程搜刮,用户输入指定课程关键字,可以搜刮查询,也可以根据课程类别分类,和类型举行搜刮;
[*]课程详细展示
[*]用户登陆
[*]在线支付
后台管理功能:
[*]管理员登录
[*]课程管理
[*]课程类别管理
[*]用户管理
[*]讲课老师管理
[*]订单管理
[*]菜单管理
[*]友情链接管理
[*]系统属性管理
[*]自定义帖子管理
[*]轮转图片帖子管理
3. 前端
3.1 首页
https://p5.toutiaoimg.com/large/pgc-image/2a551729f5b64c669ef1e05358a358a7
3.2 课程
提供按照课程的类别,类型以及搜刮框举行快速查询相关课程
https://p3.toutiaoimg.com/large/pgc-image/532434970f5643ff8cbbcdf34ca12ac8
点击任意一门课程,免费课程可以直接观看,vip课程则需要通过支付宝或者微信缴费开通vip举行观看
https://p9.toutiaoimg.com/large/pgc-image/c12f015143904fbdbf1746adb991a92c
3.3 登入
学习课程时间需要登录才气观看相关视频资料
https://p5.toutiaoimg.com/large/pgc-image/6bf89040743e44f9b97bbc7ea4ed0bcc
登入后可以查看个人中心的相关功能
https://p5.toutiaoimg.com/large/pgc-image/9e23e2f35e76482cae56f7cbcbbb6426
在我的订单界面可以查看已经购买的课程
https://p9.toutiaoimg.com/large/pgc-image/d335a43c790c4c01a0fdf79c4b267b4c
3.4 商品兑换
https://p3.toutiaoimg.com/large/pgc-image/afe29f0e332f4fce80c7bfb7af246176
3.5 课程发布
在课程发布页面可以提交发布的课程资料
https://p6.toutiaoimg.com/large/pgc-image/d04b203bc163425786369e43f91c6087
在我的发布页面可以查看所有已经发布的课程相关信息,查看稽核状态
https://p3.toutiaoimg.com/large/pgc-image/23579133d37f4aa795d90fafef8b12c0
4. 后端
4.1 登录
https://p5.toutiaoimg.com/large/pgc-image/7a41b2a3ac1f4976a336cddb7c7aaa19
4.2 系统管理
包括用户管理,脚色管理,菜单管理,可以查看对应的信息并添加,导入,修改或删除
https://p5.toutiaoimg.com/large/pgc-image/ca7c1e8523f846e78898823e06b2b1ec
脚色管理界面可以为脚色分配权限
https://p3.toutiaoimg.com/large/pgc-image/8f90f68da228456c978881d4414b3e33
4.3 课程管理
可以添加课程,对课程举行分类管理:公共课程,专业课程,免费课程等
https://p5.toutiaoimg.com/large/pgc-image/80597409465845ef8a5be14b307eb02d
https://p6.toutiaoimg.com/large/pgc-image/8cc7c3e278b643a18d867cd555e5a824
在类别管理中可以添加课程的分类信息
https://p6.toutiaoimg.com/large/pgc-image/59da38b86bcb42dc990d50fb82e37aa2
在稽核功能处可以对上传的视频举行稽核
4.4 西席管理
https://p26.toutiaoimg.com/large/pgc-image/fbdc898b5f464744b65c183ddafba97f
4.5 导航菜单
https://p26.toutiaoimg.com/large/pgc-image/51096289a5754e15b7cf62f6bde569e4
4.6 轮播管理
https://p26.toutiaoimg.com/large/pgc-image/d71aa0df3a71407482b28da54022b7fc
4.7 通知管理
https://p6.toutiaoimg.com/large/pgc-image/5b7ccf53f3164f5499523f068486956c
4.8 礼品管理
https://p5.toutiaoimg.com/large/pgc-image/15a071e78bfb4a81b0925298e4207293
5,系统的核心代码
/** * 操作日志记录注解 * Created by xiaomeng 2020-03-21 17:03*技术交流v:kaifazixun * 操作日志记录注解 * Created by wangfan on 2020-03-21 17:03 */@Target({ElementType.TYPE, ElementType.METHOD})@Retention(RetentionPolicy.RUNTIME)public @interface OperLog { /** * 模块 */ String value(); /** * 功能 */ String desc(); /** * 是否记录请求参数 */ boolean param() default true; /** * 是否记录返回效果 */ boolean result() default false; }* */@Target({ElementType.TYPE, ElementType.METHOD})@Retention(RetentionPolicy.RUNTIME)public @interface OperLog { /** * 模块 */ String value(); /** * 功能 */ String desc(); /** * 是否记录请求参数 */ boolean param() default true; /** * 是否记录返回效果 */ boolean result() default false; @Aspect@Componentpublic class OperLogAspect { private ThreadLocal startTime = new ThreadLocal(); @Autowired private OperRecordService operRecordService; @Pointcut("@annotation(com.egao.common.core.annotation.OperLog)") public void operLog() { } @Before("operLog()") public void doBefore(JoinPoint joinPoint) throws Throwable { startTime.set(System.currentTimeMillis()); } @AfterReturning(pointcut = "operLog()", returning = "result") public void doAfterReturning(JoinPoint joinPoint, Object result) { saveLog(joinPoint, result, null); } @AfterThrowing(value = "operLog()", throwing = "e") public void doAfterThrowing(JoinPoint joinPoint, Exception e) { saveLog(joinPoint, null, e); } private void saveLog(JoinPoint joinPoint, Object result, Exception e) { // 获取reques对象 ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); HttpServletRequest request = (attributes == null ? null : attributes.getRequest()); // 构建操作日志 OperRecord operRecord = new OperRecord(); operRecord.setUserId(getLoginUserId()); if (startTime.get() != null) operRecord.setSpendTime(System.currentTimeMillis() - startTime.get()); if (request != null) { operRecord.setRequestMethod(request.getMethod()); operRecord.setUrl(request.getRequestURI()); operRecord.setIp(UserAgentGetter.getIp(request)); } // 记录异常信息 if (e != null) { operRecord.setState(1); operRecord.setComments(StrUtil.sub(e.toString(), 0, 2000)); }public class BaseController { /** * 获取当前登录的user */ public User getLoginUser() { Subject subject = SecurityUtils.getSubject(); if (subject == null) return null; Object object = subject.getPrincipal(); if (object != null) return (User) object; return null; } /** * 获取当前登录的userId */ public Integer getLoginUserId() { User loginUser = getLoginUser(); return loginUser == null ? null : loginUser.getUserId(); } }/** * 用户管理 * Created by xiaomeng 2020-12-24 16:10*技术交流V:kaifazixun */@Controller@RequestMapping("/sys/user")public class UserController extends BaseController { @Autowired private UserService userService; @Autowired private DictionaryDataService dictionaryDataService; @Autowired private RoleService roleService; @Autowired private OrganizationService organizationService; @RequiresPermissions("sys:user:view") @RequestMapping() public String view(Model model) { model.addAttribute("sexList", dictionaryDataService.listByDictCode("sex")); model.addAttribute("organizationTypeList", dictionaryDataService.listByDictCode("organization_type")); model.addAttribute("rolesJson", JSON.toJSONString(roleService.list())); return "system/user.html"; } /** * 个人中心 */ @RequestMapping("/info") public String userInfo(Model model) { model.addAttribute("user", userService.getFullById(getLoginUserId())); model.addAttribute("sexList", dictionaryDataService.listByDictCode("sex")); return "index/user-info.html"; } /** * 分页查询用户 */ @OperLog(value = "用户管理", desc = "分页查询") @RequiresPermissions("sys:user:list") @ResponseBody @RequestMapping("/page") public PageResult page(HttpServletRequest request) { PageParam pageParam = new PageParam(request); pageParam.setDefaultOrder(null, new String[]{"create_time"}); return userService.listPage(pageParam); } /** * 查询全部用户 */ @OperLog(value = "用户管理", desc = "查询全部") @RequiresPermissions("sys:user:list") @ResponseBody @RequestMapping("/list") public JsonResult list(HttpServletRequest request) { PageParam pageParam = new PageParam(request); List records = userService.listAll(pageParam.getNoPageParam()); return JsonResult.ok().setData(pageParam.sortRecords(records)); } /** * 根据id查询用户 */ @OperLog(value = "用户管理", desc = "根据id查询") @RequiresPermissions("sys:user:list") @ResponseBody @RequestMapping("/get") public JsonResult get(Integer id) { PageParam pageParam = new PageParam(); pageParam.put("userId", id); List records = userService.listAll(pageParam.getNoPageParam()); return JsonResult.ok().setData(pageParam.getOne(records)); }/** * 用户管理 * Created by xiaomeng 2020-12-24 16:10*技术交流V:kaifazixun */@Controller@RequestMapping("/sys/user")public class UserController extends BaseController { @Autowired private UserService userService; @Autowired private DictionaryDataService dictionaryDataService; @Autowired private RoleService roleService; @Autowired private OrganizationService organizationService; @RequiresPermissions("sys:user:view") @RequestMapping() public String view(Model model) { model.addAttribute("sexList", dictionaryDataService.listByDictCode("sex")); model.addAttribute("organizationTypeList", dictionaryDataService.listByDictCode("organization_type")); model.addAttribute("rolesJson", JSON.toJSONString(roleService.list())); return "system/user.html"; } /** * 个人中心 */ @RequestMapping("/info") public String userInfo(Model model) { model.addAttribute("user", userService.getFullById(getLoginUserId())); model.addAttribute("sexList", dictionaryDataService.listByDictCode("sex")); return "index/user-info.html"; } /** * 分页查询用户 */ @OperLog(value = "用户管理", desc = "分页查询") @RequiresPermissions("sys:user:list") @ResponseBody @RequestMapping("/page") public PageResult page(HttpServletRequest request) { PageParam pageParam = new PageParam(request); pageParam.setDefaultOrder(null, new String[]{"create_time"}); return userService.listPage(pageParam); } /** * 查询全部用户 */ @OperLog(value = "用户管理", desc = "查询全部") @RequiresPermissions("sys:user:list") @ResponseBody @RequestMapping("/list") public JsonResult list(HttpServletRequest request) { PageParam pageParam = new PageParam(request); List records = userService.listAll(pageParam.getNoPageParam()); return JsonResult.ok().setData(pageParam.sortRecords(records)); } /** * 根据id查询用户 */ @OperLog(value = "用户管理", desc = "根据id查询") @RequiresPermissions("sys:user:list") @ResponseBody @RequestMapping("/get") public JsonResult get(Integer id) { PageParam pageParam = new PageParam(); pageParam.put("userId", id); List records = userService.listAll(pageParam.getNoPageParam()); return JsonResult.ok().setData(pageParam.getOne(records)); }/** * 字典管理 * Created by xiaomeng on 2021-03-14 11:29:03 * 技术交流加v:kafazixun */@Controller@RequestMapping("/sys/dict")public class DictionaryController extends BaseController { @Autowired private DictionaryService dictionaryService; @RequiresPermissions("sys:dict:view") @RequestMapping() public String view() { return "system/dictionary.html"; } /** * 分页查询字典 */ @OperLog(value = "字典管理", desc = "分页查询") @RequiresPermissions("sys:dict:list") @ResponseBody @RequestMapping("/page") public PageResult page(HttpServletRequest request) { PageParam pageParam = new PageParam(request); return new PageResult(dictionaryService.page(pageParam, pageParam.getWrapper()).getRecords(), pageParam.getTotal()); } /** * 查询全部字典 */ @OperLog(value = "字典管理", desc = "查询全部") @RequiresPermissions("sys:dict:list") @ResponseBody @RequestMapping("/list") public JsonResult list(HttpServletRequest request) { PageParam pageParam = new PageParam(request); return JsonResult.ok().setData(dictionaryService.list(pageParam.getOrderWrapper())); } /** * 根据id查询字典 */ @OperLog(value = "字典管理", desc = "根据id查询") @RequiresPermissions("sys:dict:list") @ResponseBody @RequestMapping("/get") public JsonResult get(Integer id) { return JsonResult.ok().setData(dictionaryService.getById(id)); }6,源码获取
关注评论转发之后私信复兴【888】即刻免费获取
转发了 转发了 转发了 转发了 转发了 转发了 转发了 888
页:
[1]