🍅 作者主页:Java李杨勇
🍅 简介:Java领域优质创作者🏆、【java李杨勇】公号作者✌ 简历模板、学习资料、面试题库【关注我,都给你】
🍅文末获取源码联系🍅
临近学期结束,还是毕业设计,你还在做java程序网络编程,期末作业,老师的作业要求觉得大了吗?不知道毕业设计该怎么办?网页功能的数量是否太多?没有合适的类型或系统?等等。这里,你想解决的问题,在下方专栏👇🏻👇🏻👇🏻👇🏻
Java项目精品实战案例
https://blog.csdn.net/weixin_39709134/category_11128297.html
web前端期末大作业网页实战
https://blog.csdn.net/weixin_39709134/category_11374891.html
视频演示:Java毕业设计项目实战-健康推广信息管理系统.mp4
前言:
健康管理不仅是一种理念,更是一种方法,是一套完善而彻底的服务程序,其目的是为了使患者和健康的人更好地拥有健康、恢复健康、促进健康,努力节约资金,有效降低医疗费用。健康管理具有以下主要功能:一是了解居民的身体年龄,判断疾病方向;第二,可以根据日常行为判断发病概率,在此基础上,医生可以提供降低慢性病风险的行为干预方案。三是对高危人群的健康状况进行长时间(终身)跟踪,最大限度地减少重大疾病的发生;第四,它可以节省时间和金钱在维持健康和提高医疗效率。
面向教师的健康管理平台的目的,对于个人来说,就是如何利用健康检查系统中的信息,为人们的健康保驾护航。而卫生信息管理和信息管理系统的使用,不仅需要具备基础医学知识、临床医学知识、流行病学知识、计算机技术、数理统计等综合素质的专业人员,还需要具备庞大的保健医学、预防医学、专业的临床医学、康复医学等,有资深专家团队支持,可为个人提供一系列健康管理服务。当今世界,数字化信息管理不是计算机,只有利用计算机技术,采用我国各高校统一标准的健康考试系统形式,开发高校健康考试系统系统软件,设置计算机编号的教师健康考试系统,制作教师健康体检档案,并详细记录体检过程中发现的健康问题及处理情况等,实现用户的健康体检系统信息在校园网信息的交换与共享,利用计算机技术,实现了用户健康检查系统的连续动态管理。健康信息管理系统以计算机为工具,通过对用户体检所获得的数据进行信息管理,将管理人员从繁琐的数据计算处理中解脱出来,帮助组用户更好地监督体检,从而全面提高质量。具体来说,系统可以对[用户的基本健康状况进行各种必要的统计和分析。
主要模块 :
普通用户:用户登录、注册、修改密码、修改个人信息、查看主页健康模块信息、分类查看健康推广模块信息、查看详情信息、数据排行榜、相关信息推荐、收藏、评论、关注发布者、健康信息发布、取消收藏、取消关注、我的收藏列表、我的关注列表等主要功能
管理员: 管理员登陆、首页统计用户信息、登录信息。注册信息等、
推广类型管理:查看列表、 模糊搜索、添加、修改、删除
推广详情管理:查看列表、 模糊搜索、添加、修改、删除
管理员信息管理:查看和修改密码
通知公告管理:查看列表、 模糊搜索、添加、修改、删除
用户信息管理:查看列表、 模糊搜索 、删除
评论回复管理:查看列表、 模糊搜索、删除
功能截图:
用户登录:
首页:
分类:
发布健康推广信息:
输入标题、作者信息、分类以及封面图片和富文本编辑器的主要内容
详情:可以收藏和点击查看作者信息
评论回复收藏:
个人中心:包括基本信息、我的推广笔记、收藏夹、我的关注等
后台管理:
健康分类:
健康推广详情:
添加修改:
管理员信息:
公告信息:
用户信息:
评论回复:
关键代码:
/*** 用户控制器* @author lyy**/
@RestController
@RequestMapping("/admin/user")
public class UserAdminController {@Resourceprivate 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;}/*** unfollow* @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(ret);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;}
}
@RestController
@RequestMapping("/admin/article")
public class ArticleAdminController {@Resourceprivate ArticleService articleService;@Resourceprivate StartupRunner startupRunner;@Resourceprivate ArticleIndex articleIndex;@Resourceprivate UserService userService;@Value("${imageFilePath}")private String imageFilePath; // 图片上传路径/*** 生成所有帖子索引(审核通过的资源帖子)* * @return*/@ResponseBody@RequestMapping(value = "/genAllIndex")public boolean genAllIndex() {List<Article> articleList = articleService.list();for (Article article : articleList) {try {article.setContentNoTag(StringUtil.stripHtml(article.getContent())); // 去除html标签articleIndex.addIndex(article);} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();return false;}}return true;}/*** 前台分页查询文章* * @param article* @param publishDates* @param page* @param pageSize* @return*/@RequestMapping("/list")public Map<String, Object> list(Article article,@RequestParam(value = "publishDates", required = false) String publishDates,@RequestParam(value = "p", required = false) Integer p,@RequestParam(value = "page", required = false) Integer page,@RequestParam(value = "pageSize", required = false) Integer pageSize, HttpServletRequest request) {Map<String, Object> resultMap = new HashMap<String, Object>();User user = (User) request.getSession().getAttribute("user");List<Article> retArt = new ArrayList<>();String s_bPublishDate = null; // 开始时间String s_ePublishDate = null; // 结束时间if (StringUtil.isNotEmpty(publishDates)) {String[] strs = publishDates.split(" - "); // 拆分时间段s_bPublishDate = strs[0];s_ePublishDate = strs[1];}if (p != null && p == 1) {User u = userService.findById(user.getUserId());article.setUserId(u.getUserId());} else if (p != null && p == 2) {User u = userService.findById(user.getUserId());String artIds = u.getArticleIds();List<String> result = new ArrayList<>();if (StringUtils.isNotBlank(artIds)) {result = Arrays.asList(StringUtils.split(artIds, ","));}List<Integer> retIds = new ArrayList<>();for (String temp : result) {retIds.add(Integer.valueOf(temp).intValue());}retArt = articleService.findByListId(retIds);}Long total = articleService.getCount(article, s_bPublishDate, s_ePublishDate);if (p != null && p == 2) {total = (long) retArt.size();}int totalPage = (int) (total % pageSize == 0 ? total / pageSize : total / pageSize + 1); // 总页数resultMap.put("totalPage", totalPage);resultMap.put("errorNo", 0);if (p != null && p == 2) {resultMap.put("data", retArt);} else {resultMap.put("data", articleService.list(article, s_bPublishDate, s_ePublishDate, page - 1, pageSize));}resultMap.put("total", total);return resultMap;}/*** 根据ID查找文章* * @param articleId* @return*/@RequestMapping("/findById")public Map<String, Object> findById(Integer articleId) {Map<String, Object> resultMap = new HashMap<String, Object>();Map<String, Object> trmpMap = new HashMap<String, Object>();Article article = articleService.findById(articleId);trmpMap.put("articleId", article.getArticleId());trmpMap.put("title", article.getTitle());trmpMap.put("content", article.getContent());trmpMap.put("publishDate", article.getPublishDate());trmpMap.put("author", article.getAuthor());trmpMap.put("classify", article.getClassify().getClassifyId());trmpMap.put("click", article.getClick());trmpMap.put("commentNum", article.getCommentNum());trmpMap.put("isTop", article.getIsTop());trmpMap.put("isOriginal", article.getIsOriginal());trmpMap.put("imageName", article.getImageName());resultMap.put("errorNo", 0);resultMap.put("data", trmpMap);return resultMap;}/*** 添加或者修改文章* * @param article* @return*/@RequestMapping("/save")public Map<String, Object> save(Article article, @RequestParam(value = "_mode", required = false) String mode)throws Exception {Map<String, Object> resultMap = new HashMap<String, Object>();if (article.getIsTop() == null) {article.setIsTop(0);}if (article.getIsOriginal() == null) {article.setIsOriginal(0);}if (article.getClick() == null) {article.setClick(0);}if (article.getCommentNum() == null) {article.setCommentNum(0);}if (StringUtil.isEmpty(article.getImageName())) {article.setImageName("jzytp.JPG");}article.setPublishDate(new Date());article.setContentNoTag(StringUtil.Html2Text(article.getContent()));articleService.save(article);if ("add".equals(mode)) {articleIndex.addIndex(article);} else if ("edit".equals(mode)) {articleIndex.updateIndex(article);}resultMap.put("errorNo", 0);resultMap.put("data", 1);startupRunner.loadData();return resultMap;}/*** 批量删除文章* * @param ids* @return*/@RequestMapping("/delete")public Map<String, Object> delete(@RequestParam(value = "articleId") String ids) throws Exception {Map<String, Object> resultMap = new HashMap<String, Object>();String[] idsStr = ids.split(",");for (int i = 0; i < idsStr.length; i++) {articleService.delete(Integer.parseInt(idsStr[i]));articleIndex.deleteIndex(idsStr[i]);}resultMap.put("errorNo", 0);resultMap.put("data", 1);startupRunner.loadData();return resultMap;}/*** 新闻内容图片上传处理* * @param file* @param CKEditorFuncNum* @return*/@RequestMapping("/ckeditorUpload")public String ckeditorUpload(@RequestParam("upload") MultipartFile file, String CKEditorFuncNum) {String fileName = file.getOriginalFilename(); // 获取文件名String suffixName = fileName.substring(fileName.lastIndexOf(".")); // 获取文件的后缀String newFileName = "";try {newFileName = DateUtil.getCurrentDateStr() + suffixName; // 生成新的文件名FileUtils.copyInputStreamToFile(file.getInputStream(), new File(imageFilePath + newFileName)); // 上传} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();}// 回调到页面StringBuffer sb = new StringBuffer();sb.append("<script type=\"text/javascript\">");sb.append("window.parent.CKEDITOR.tools.callFunction(" + CKEditorFuncNum + ",'" + "/static/images/" + newFileName+ "','')");sb.append("</script>");return sb.toString();}
数据表设计:
数据库名:boot_health
文档版本:V1.0.0
文档描述:数据库表设计描述
表hibernate_sequence
编号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
1 | next_val | bigint | 20 | 0 | Y | N |
表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 |
获取源码:
大家点赞、收藏、关注、评论啦 、查看👇🏻👇🏻👇🏻微信公众号获取联系👇🏻👇🏻👇🏻
打卡 文章 更新 101/ 365天
精彩专栏推荐:
在下方专栏👇🏻👇🏻👇🏻👇🏻
Java项目精品实战案例
https://blog.csdn.net/weixin_39709134/category_11128297.html
web前端期末大作业网页实战
https://blog.csdn.net/weixin_39709134/category_11374891.html