Java毕业设计--健康推广管理系统项目实战【Springboot+mybatis+layui等实现】
🍅 作者主頁: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
總結
以上是生活随笔為你收集整理的Java毕业设计--健康推广管理系统项目实战【Springboot+mybatis+layui等实现】的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ❤️六W字《计算机基础知识》(六)(建议
- 下一篇: 基于java springboot+my