🍅 作者主页:Java李杨勇
🍅 简介:Java领域优质创作者🏆、【java李杨勇】公号作者✌ 简历模板、学习资料、面试题库【关注我,都给你】
🍅文末获取源码联系🍅
功能设计和技术:
普通用户:登录注册、首页操作系统教学信息浏览、操作系统教学分类查看、操作系统教学详情查看、用户评论交流、回复讨论、收藏模块、收藏模块、浏览量统计、关注用户、我的个人中心、我的关注、我的收藏等
管理员: 登录和注册用户统计、分类文章统计、教学分类管理、文章信息分类管理、评论管理、回复管理、用户管理、个人信息管理、退出等。
主要技术:Java、springmvc、mybatis、mysql、tomcat、jquery、layui、bootstarp、JavaScript、html、css、jsp、log4j等一些常见的基本技术。
主要功能截图:
用户登录注册:
系统平台首页:
分类查看信息:
数据文章查看: 用户可以收藏和查看作者信息
评论回复交流: 对文章进行评论回复交流等
收藏模块:
个人资料模块:
后台管理模块:
发布类型管理:
发布详情管理:
评论回复管理:
用户信息管理:
个人中心管理:
主要代码类实现:
/** * 用户控制器 * @author lyy * */ @RestController @RequestMapping("/admin/user") public class UserAdminController { @Resource private UserService userService; @Value("${MD5Salt}") private String salt; // md5加密盐 /** * 根据ID查找用户 * @param userId * @return */ @RequestMapping("/findById") public Map<String, Object> findById(Integer userId) { Map<String, Object> resultMap = new HashMap<String, Object>(); User user = userService.findById(userId); resultMap.put("errorNo", 0); resultMap.put("data", user); return resultMap; } /** * 分页查询用户 * @param user * @param page * @return */ @RequestMapping("/list") public Map<String, Object> list(User user, @RequestParam(value = "latelyLoginTimes", required = false) String latelyLoginTimes, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "pageSize", required = false) Integer pageSize) { String s_bregistrationDate = null; // 开始时间 String s_eregistrationDate = null; // 结束时间 if (StringUtil.isNotEmpty(latelyLoginTimes)) { String[] strs = latelyLoginTimes.split(" - "); // 拆分时间段 s_bregistrationDate = strs[0]; s_eregistrationDate = strs[1]; } List<User> userList = userService.list(user, s_bregistrationDate, s_eregistrationDate, page - 1, pageSize); Long total = userService.getCount(user, s_bregistrationDate, s_eregistrationDate); Map<String, Object> resultMap = new HashMap<String, Object>(); resultMap.put("errorNo", 0); resultMap.put("data", userList); resultMap.put("total", total); return resultMap; } /** * 取消关注 * @param request * @param userId * @return */ @RequestMapping("/removeFocusUser") public ModelAndView removeFocusUser(HttpServletRequest request, String userId) { ModelAndView mav = new ModelAndView(); User user = (User) request.getSession().getAttribute("user");// 当前登录用户 String userIds = user.getUserIds(); List<String> tempList = Arrays.asList(userIds.split(",")); List<String> lineIdList = new ArrayList<>(tempList); lineIdList.remove(userId); String ret = StringUtils.join(lineIdList, ","); user.setUserIds(ret); userService.save(user); mav.setViewName("redirect:/viewFocusUser"); return mav; } /** * 关注用户 * @param request * @param userId * @return */ @RequestMapping("/addFocusUser") public ModelAndView addFocusUser(HttpServletRequest request, String userId) { ModelAndView mav = new ModelAndView(); User user = (User) request.getSession().getAttribute("user");// 当前登录用户 String userIds = user.getUserIds(); List<String> tempList = Arrays.asList(userIds.split(",")); List<String> lineIdList = new ArrayList<>(tempList); lineIdList.add(userId); String ret = StringUtils.join(lineIdList, ","); user.setUserIds(ret); userService.save(user); mav.setViewName("redirect:/viewFocusUser"); return mav; } @RequestMapping("/addFocusUser/{userId}") public ModelAndView addFocusUser(@PathVariable(value = "userId", required = false) Integer userId, HttpSession session) { ModelAndView mav = new ModelAndView(); User user = (User) session.getAttribute("user");// 当前登录用户 String userIds = user.getUserIds(); List<String> tempList = new ArrayList<>(); if (userIds != null) { tempList = Arrays.asList(userIds.split(",")); } List<String> lineIdList = new ArrayList<>(tempList); lineIdList.add(userId.toString()); String ret = StringUtils.join(lineIdList, ","); user.setUserIds(ret); userService.save(user); mav.setViewName("redirect:/viewFocusUser"); return mav; } /** * 取消收藏 * @param request * @return */ @RequestMapping("/removeCollection") public ModelAndView removeCollection(HttpServletRequest request, String artId) { ModelAndView mav = new ModelAndView(); User user = (User) request.getSession().getAttribute("user");// 当前登录用户 String artIds = user.getArticleIds(); List<String> tempList = Arrays.asList(artIds.split(",")); List<String> lineIdList = new ArrayList<>(tempList); lineIdList.remove(artId); String ret = StringUtils.join(lineIdList, ","); user.setArticleIds(ret); userService.save(user); mav.setViewName("redirect:/viewCollection"); return mav; } /** * 收藏 * @param request * @return */ @RequestMapping("/addCollection") public ModelAndView addCollection(HttpServletRequest request, String artId) { ModelAndView mav = new ModelAndView(); User user = (User) request.getSession().getAttribute("user");// 当前登录用户 // String artIds = user.getArticleIds(); // List<String> tempList= Arrays.asList(artIds.split(",")); // List<String> lineIdList = new ArrayList<>(tempList); // lineIdList.add(artId); // String ret = StringUtils.join(lineIdList, ","); user.setArticleIds(artId); userService.save(user); mav.setViewName("redirect:/viewCollection"); return mav; } @RequestMapping("/delete") public Map<String, Object> delete(Integer userId) { Map<String, Object> resultMap = new HashMap<String, Object>(); userService.delete(userId); resultMap.put("errorNo", 0); return resultMap; }
主要数据库设计:
数据库名:teachingwebsite
文档版本:V1.0.0
文档描述:数据库表设计描述
表t_admin
编号 |
名称 |
数据类型 |
长度 |
小数位 |
允许空值 |
主键 |
1 |
admin_id |
int |
10 |
0 |
N |
Y |
2 |
head_portrait |
varchar |
200 |
0 |
Y |
N |
3 |
password |
varchar |
200 |
0 |
Y |
N |
4 |
phone |
varchar |
200 |
0 |
Y |
N |
5 |
sex |
varchar |
50 |
0 |
Y |
N |
6 |
signature |
varchar |
500 |
0 |
Y |
N |
7 |
true_name |
varchar |
200 |
0 |
Y |
N |
8 |
user_name |
varchar |
200 |
0 |
Y |
N |
表t_article
编号 |
名称 |
数据类型 |
长度 |
小数位 |
允许空值 |
主键 |
1 |
article_id |
int |
10 |
0 |
N |
Y |
2 |
author |
varchar |
200 |
0 |
N |
N |
3 |
click |
int |
10 |
0 |
Y |
N |
4 |
comment_num |
int |
10 |
0 |
Y |
N |
5 |
content |
text |
65535 |
0 |
Y |
N |
6 |
image_name |
varchar |
255 |
0 |
Y |
N |
7 |
is_original |
int |
10 |
0 |
Y |
N |
8 |
is_top |
int |
10 |
0 |
Y |
N |
9 |
publish_date |
datetime |
19 |
0 |
Y |
N |
10 |
title |
varchar |
200 |
0 |
N |
N |
11 |
classify_id |
int |
10 |
0 |
Y |
N |
12 |
user_id |
int |
10 |
0 |
Y |
N |
表t_blogger
编号 |
名称 |
数据类型 |
长度 |
小数位 |
允许空值 |
主键 |
1 |
blogger_id |
int |
10 |
0 |
N |
Y |
2 |
head_portrait |
varchar |
200 |
0 |
Y |
N |
3 |
motto |
varchar |
500 |
0 |
Y |
N |
4 |
nick_name |
varchar |
200 |
0 |
Y |
N |
5 |
site |
varchar |
200 |
0 |
Y |
N |
6 |
signature |
varchar |
500 |
0 |
Y |
N |
表t_classify
编号 |
名称 |
数据类型 |
长度 |
小数位 |
允许空值 |
主键 |
1 |
classify_id |
int |
10 |
0 |
N |
Y |
2 |
classify_name |
varchar |
200 |
0 |
N |
N |
表t_comment
编号 |
名称 |
数据类型 |
长度 |
小数位 |
允许空值 |
主键 |
1 |
comment_id |
int |
10 |
0 |
N |
Y |
2 |
comment_date |
datetime |
19 |
0 |
Y |
N |
3 |
content |
varchar |
500 |
0 |
Y |
N |
4 |
article_id |
int |
10 |
0 |
Y |
N |
5 |
user_id |
int |
10 |
0 |
Y |
N |
表t_link
编号 |
名称 |
数据类型 |
长度 |
小数位 |
允许空值 |
主键 |
1 |
link_id |
int |
10 |
0 |
N |
Y |
2 |
link_email |
varchar |
200 |
0 |
Y |
N |
3 |
link_name |
varchar |
200 |
0 |
Y |
N |
4 |
link_url |
varchar |
200 |
0 |
Y |
N |
5 |
order_num |
int |
10 |
0 |
Y |
N |
表t_notice
编号 |
名称 |
数据类型 |
长度 |
小数位 |
允许空值 |
主键 |
1 |
notice_id |
int |
10 |
0 |
N |
Y |
2 |
grade |
int |
10 |
0 |
Y |
N |
3 |
content |
varchar |
500 |
0 |
Y |
N |
4 |
publish_date |
datetime |
19 |
0 |
Y |
N |
表t_reply
编号 |
名称 |
数据类型 |
长度 |
小数位 |
允许空值 |
主键 |
1 |
reply_id |
int |
10 |
0 |
N |
Y |
2 |
content |
varchar |
500 |
0 |
Y |
N |
3 |
reply_date |
datetime |
19 |
0 |
Y |
N |
4 |
comment_id |
int |
10 |
0 |
Y |
N |
5 |
user_id |
int |
10 |
0 |
Y |
N |
表t_timeline
编号 |
名称 |
数据类型 |
长度 |
小数位 |
允许空值 |
主键 |
1 |
timeline_id |
int |
10 |
0 |
N |
Y |
2 |
content |
varchar |
200 |
0 |
Y |
N |
3 |
publish_date |
datetime |
19 |
0 |
Y |
N |
4 |
month |
varchar |
200 |
0 |
Y |
N |
5 |
year |
varchar |
200 |
0 |
Y |
N |
设计项目总结:
经过近期对Java 面向对象程序设计、前端知识以及Java框架的掌握和学习,以及这段时间本教育教学系统的开发,让我更加了解到 Java 学习的重要性。在开发这个系统时,我不仅进行了多次的试验,而且也对系统的功能进行了测试。在论文的实现过程当中,我从Java的认识到熟练运用注入了非常多的努力,到后面可以进行相关技术的运用也感到非常的开心。在这过程当中,我发现Java其实有非常之多的功能可以进行探索。Java同时具有封装性、抽象性、多态性以及继承性。可以对代码进行重复使用以及扩充使用,大幅度提高开发软件时的整体速度和效率。我作为教育技术学的学生,学好Java语言不管对我以后的就业还是现在的知识面的扩增都有着很重要的意义。我学习程序设计的主要目的就是提高自己实际问题的程序解决方案的关键技能和技术, Java 面向对象程序设计是一科实践性相对来说非常比较强的语言了、SpringMVC框架的MVC三层架构模式、和框架中遇到的设计模式将数据访问和逻辑操作都集中到组件里面去了 , 增强了系统的复用性和扩展性。使系统的扩展性大大增强。以及前端jQuery、js、jsp、css样式的掌握让我对网页的布局、样式调整、字体等让网页效果实现的更加精准。
源码联系获取:
大家点赞、收藏、关注、评论啦 、查看👇🏻👇🏻👇🏻微信公众号获取联系方式👇🏻👇🏻👇🏻
打卡 文章 更新 121/ 365天
精彩专栏推荐订阅:在下方专栏👇🏻👇🏻👇🏻👇🏻
Java项目精品实战案例《100套》https://blog.csdn.net/weixin_39709134/category_11128297.html
原文链接:https://blog.csdn.net/weixin_39709134/article/details/121905596?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522166511020816800184181020%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=166511020816800184181020&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-9-121905596-null-null.nonecase&utm_term=Java%E6%95%99%E5%AD%A6
请登录后查看评论内容