Springboot實(shí)例講解實(shí)現(xiàn)寵物醫(yī)院管理系統(tǒng)流程
項(xiàng)目編號(hào):BS-XX-098
本系統(tǒng)前臺(tái)面向的用戶(hù)是客戶(hù),客戶(hù)可以進(jìn)行預(yù)約、瀏覽醫(yī)院發(fā)布的文章、進(jìn)入醫(yī)院商城為寵物購(gòu)物、如有疑問(wèn)可以向官方留言、還可以查看關(guān)于自己的所有記錄信息,如:看病記錄、預(yù)約記錄、疫苗注射記錄等。后臺(tái)面向的用戶(hù)是醫(yī)院人員,系統(tǒng)管理員擁有最高權(quán)限,可以對(duì)所有數(shù)據(jù)進(jìn)行管理,為所有的角色分配權(quán)限以及創(chuàng)建角色;業(yè)務(wù)管理員的權(quán)限主要是對(duì)一些常用數(shù)據(jù)的維護(hù);醫(yī)生可以接受客戶(hù)發(fā)布的預(yù)約醫(yī)生的預(yù)約單以及處理屬于自己的預(yù)約單,回答客戶(hù)的問(wèn)診;美容師可以接受客戶(hù)發(fā)布的預(yù)約美容的預(yù)約單以及處理屬于自己的預(yù)約單。
本項(xiàng)目核心技術(shù)采用Spring Boot+Mybatis;開(kāi)發(fā)工具idea;數(shù)據(jù)庫(kù)MySQL5.6;模版引擎采用的是Thymeleaf;安全框架采用Shiro,實(shí)現(xiàn)了完整權(quán)限系統(tǒng),Controller方法采用Shiro注解來(lái)實(shí)現(xiàn)有效的權(quán)限控制;前臺(tái)界面采用了Bootstrap技術(shù);后臺(tái)界面采用了EasyUI技術(shù);
#### 未注冊(cè)用戶(hù)
非注冊(cè)用戶(hù)(即游客身份)進(jìn)入醫(yī)院官網(wǎng)首頁(yè),可以瀏覽關(guān)于醫(yī)院的宣傳以及醫(yī)院發(fā)布的文章,進(jìn)入醫(yī)院商城瀏覽正在發(fā)售的商品,搜索已發(fā)布的文章和商品,注冊(cè)以及登錄。
#### 已注冊(cè)用戶(hù)
注冊(cè)用戶(hù)可以修改個(gè)人信息和寵物信息,發(fā)布預(yù)約單(預(yù)約醫(yī)生和美容師),在醫(yī)院的商城購(gòu)物,收藏商品,給官方留言,查看與自己相關(guān)的記錄信息,如:病例記錄、預(yù)約記錄、問(wèn)診記錄、訂單記錄等,注銷(xiāo)退出系統(tǒng)。
#### 醫(yī)生
醫(yī)生可以查看并接受客戶(hù)發(fā)布的未被處理的預(yù)約醫(yī)生的預(yù)約單,結(jié)束屬于自己的預(yù)約單,回復(fù)客戶(hù)的網(wǎng)上問(wèn)診以及查看自己回復(fù)的問(wèn)診記錄,修改個(gè)人密碼,安全退出系統(tǒng)。
#### 美容師
美容師可以查看并接受客戶(hù)發(fā)布的未被處理的預(yù)約美容師的預(yù)約單,結(jié)束屬于自己的預(yù)約單。
#### 業(yè)務(wù)管理員
業(yè)務(wù)管理員具有進(jìn)貨管理(包括進(jìn)貨入庫(kù)、退貨出庫(kù)、進(jìn)貨單據(jù)查詢(xún)、退貨單據(jù)查詢(xún)以及當(dāng)前庫(kù)存查詢(xún))、銷(xiāo)售管理(包括銷(xiāo)售出庫(kù)、客戶(hù)退貨入庫(kù)、銷(xiāo)售單據(jù)查詢(xún)、退貨單據(jù)查詢(xún))、庫(kù)存管理(包括商品報(bào)損、商品報(bào)溢、庫(kù)存報(bào)警、報(bào)損報(bào)溢記錄查詢(xún))、查看統(tǒng)計(jì)數(shù)據(jù)(供應(yīng)商進(jìn)退貨單統(tǒng)計(jì)、客戶(hù)進(jìn)退貨單統(tǒng)計(jì)、按日統(tǒng)計(jì)銷(xiāo)售利潤(rùn)、按月統(tǒng)計(jì)銷(xiāo)售利潤(rùn))、供應(yīng)商管理、客戶(hù)管理、商品管理、期初庫(kù)存管理、前臺(tái)輪播圖管理、設(shè)備類(lèi)型管理、設(shè)備管理、設(shè)備使用管理、設(shè)備使用記錄管理、文章類(lèi)型管理、文章管理、客戶(hù)留言管理、醫(yī)院用品管理、醫(yī)院用品出入庫(kù)管理、醫(yī)院用品出入庫(kù)記錄管理、客戶(hù)消息管理、客戶(hù)訂單處理、客戶(hù)預(yù)約單管理、客戶(hù)問(wèn)診記錄管理、病歷單管理、化驗(yàn)記錄管理、疫苗注射記錄管理、客戶(hù)回訪(fǎng)記錄管理、寄養(yǎng)記錄管理、修改密碼、安全退出系統(tǒng)。
#### 系統(tǒng)管理員
系統(tǒng)管理員除了具備業(yè)務(wù)管理員的所有權(quán)限外,還有創(chuàng)建角色并賦予角色權(quán)限的功能,還可以查看系統(tǒng)操作日志。
#### 系統(tǒng)自身
系統(tǒng)每天0點(diǎn)自動(dòng)創(chuàng)建明天的分別屬于各個(gè)醫(yī)生或美容師各個(gè)時(shí)間段的空預(yù)約單(未被客戶(hù)接受的預(yù)約單)、每分鐘自動(dòng)篩選出5分鐘后過(guò)期的空預(yù)約單并從數(shù)據(jù)庫(kù)刪除、每分鐘自動(dòng)篩選和取消客戶(hù)提交的超過(guò)一天未支付的訂單并釋放庫(kù)存、每天凌晨1點(diǎn)自動(dòng)將發(fā)布日期超過(guò)3個(gè)月的商品的"新品"標(biāo)簽去掉、醫(yī)院上班后(8點(diǎn))系統(tǒng)自動(dòng)給當(dāng)天有預(yù)約的客戶(hù)發(fā)送提醒消息
下面展示一下系統(tǒng)的整體功能:
前端首頁(yè)
商城首頁(yè)
前端用戶(hù)登陸注冊(cè)
個(gè)人中心
個(gè)人訂單
預(yù)約醫(yī)生
客戶(hù)服務(wù)功能
添加到購(gòu)物車(chē)
提交訂單
支付訂單
新聞文章
后臺(tái)管理功能
進(jìn)貨管理
銷(xiāo)售管理
庫(kù)存管理
統(tǒng)計(jì)報(bào)表
基礎(chǔ)數(shù)據(jù)管理
預(yù)約單管理
看病服務(wù)模塊
系統(tǒng)管理模塊
具體的角色就不再一一展示了,不同的用戶(hù)可以根據(jù)后臺(tái)設(shè)定不同的操作權(quán)限,整體系統(tǒng)的功能非常強(qiáng)大,幾乎包含了寵物商城、寵物看病就醫(yī)、寵物進(jìn)銷(xiāo)存等管理的所有功能模塊,可以根據(jù)自己的需求選擇一部分功能進(jìn)行使用!
比如醫(yī)生登陸后:
系統(tǒng)工程結(jié)構(gòu):
部分核心代碼:
package com.ledao.controller; import com.ledao.entity.Article; import com.ledao.service.ArticleService; import com.ledao.service.ArticleTypeService; import com.ledao.util.PageUtil; import com.ledao.util.StringUtil; import org.springframework.stereotype.Controller; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; import javax.validation.Valid; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @author 指南針 * @company * @create 2022-01-27 19:04 */ @Controller @RequestMapping("/article") public class ArticleController { @Resource private ArticleService articleService; @Resource private ArticleTypeService articleTypeService; @RequestMapping("/search") public ModelAndView search(@Valid Article searchArticle, BindingResult bindingResult) { ModelAndView mav = new ModelAndView(); if (bindingResult.hasErrors()) { mav.addObject("error", bindingResult.getFieldError().getDefaultMessage()); mav.addObject("title", "首頁(yè)"); mav.addObject("mainPage", "page/indexFirst"); } else { Map<String, Object> map = new HashMap<>(16); map.put("title", StringUtil.formatLike(searchArticle.getTitle())); List<Article> articleList = articleService.list(map); mav.addObject("articleList", articleList); mav.addObject("title", "關(guān)于(" + searchArticle.getTitle() + ")的文章"); mav.addObject("mainPage", "page/article/articleResult"); mav.addObject("mainPageKey", "#b"); mav.addObject("searchArticle", searchArticle); mav.addObject("total", articleList.size()); } mav.setViewName("index"); return mav; } /** * 分頁(yè)分類(lèi)查詢(xún)文章信息 * * @param page * @param typeId * @return */ @RequestMapping("/list/{id}") public ModelAndView list(@PathVariable(value = "id", required = false) Integer page, @RequestParam(value = "typeId", required = false) Integer typeId) { ModelAndView mav = new ModelAndView(); Map<String, Object> map = new HashMap<>(16); String typeName = articleTypeService.findById(typeId).getName(); map.put("typeId", typeId); int pageSize = 7; map.put("start", (page - 1) * pageSize); map.put("size", pageSize); List<Article> articleList = articleService.list(map); Long total = articleService.getCount(map); mav.addObject("typeName", typeName); mav.addObject("title", "文章列表(" + typeName + ")"); mav.addObject("articleList", articleList); mav.addObject("total", total); mav.addObject("pageCode", PageUtil.genPagination("/article/list", total, page, pageSize, typeId)); mav.addObject("mainPage", "page/article/articleList"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } /** * 根據(jù)id獲取文章詳細(xì)信息 * * @param id * @return */ @RequestMapping("/{id}") public ModelAndView view(@PathVariable(value = "id", required = false) Integer id) { ModelAndView mav = new ModelAndView(); Article article = articleService.findById(id); article.setClick(article.getClick()+1); articleService.update(article); mav.addObject("typeName", articleTypeService.findById(article.getTypeId()).getName()); mav.addObject("article", article); mav.addObject("title", article.getTitle()); mav.addObject("pageCode", this.getLastAndNextArticle(articleService.getLast(id), articleService.getNext(id))); mav.addObject("mainPage", "page/article/articleView"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } /** * 獲取上一篇文章和下一篇文章 * * @param lastArticle * @param nextArticle * @return */ private String getLastAndNextArticle(Article lastArticle, Article nextArticle) { StringBuffer pageCode = new StringBuffer(); if (lastArticle == null || lastArticle.getId() == null) { pageCode.append("<p>上一篇:沒(méi)有了</p>"); } else { pageCode.append("<p>上一篇:<a href='/article/" + lastArticle.getId() + "'>" + lastArticle.getTitle() + "</a></p>"); } if (nextArticle == null || nextArticle.getId() == null) { pageCode.append("<p>下一篇:沒(méi)有了</p>"); } else { pageCode.append("<p>下一篇:<a href='/article/" + nextArticle.getId() + "'>" + nextArticle.getTitle() + "</a></p>"); } return pageCode.toString(); } }
package com.ledao.controller; import com.ledao.entity.*; import com.ledao.service.*; import com.ledao.util.PageUtil; import com.ledao.util.StringUtil; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; import javax.servlet.http.HttpSession; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 前臺(tái)客戶(hù)商品評(píng)論Controller層 * * @author 指南針 * @company * @create 2022-05-27 23:04 */ @Controller @RequestMapping("/comment") public class CommentController { @Resource private CommentService commentService; @Resource private GoodsService goodsService; @Resource private SaleListGoodsService saleListGoodsService; @Resource private ReturnListGoodsService returnListGoodsService; @Resource private GoodsTypeService goodsTypeService; @Resource private CustomerService customerService; @Resource private FavoriteService favoriteService; /** * 我的化驗(yàn)記錄 * * @param page * @param session * @return */ @RequestMapping("/myComment/list/{id}") public ModelAndView myComment(@PathVariable(value = "id", required = false) Integer page, HttpSession session) { ModelAndView mav = new ModelAndView(); Map<String, Object> map = new HashMap<>(16); int pageSize = 4; map.put("start", (page - 1) * pageSize); map.put("size", pageSize); Customer currentCustomer = (Customer) session.getAttribute("currentCustomer"); map.put("customerId", currentCustomer.getId()); List<Comment> commentList = commentService.list(map); for (Comment comment : commentList) { comment.setGoods(goodsService.findById(comment.getGoodsId())); comment.setSaleListGoods(saleListGoodsService.findById(comment.getSaleListGoodsId())); comment.setSaleList(comment.getSaleListGoods().getSaleList()); } Long total = commentService.getCount(map); mav.addObject("commentList", commentList); mav.addObject("total", total); mav.addObject("pageCode", PageUtil.genPagination2("/comment/myComment/list", total, page, pageSize)); mav.addObject("title", "我的評(píng)論"); mav.addObject("mainPage", "page/comment/myComment"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } /** * 跳轉(zhuǎn)到客戶(hù)評(píng)價(jià)商品界面 * * @param saleListGoodsId * @return */ @RequestMapping("/commentPage") public ModelAndView commentPage(Integer saleListGoodsId) { ModelAndView mav = new ModelAndView(); SaleListGoods saleListGoods = saleListGoodsService.findById(saleListGoodsId); Goods goods = goodsService.findById(saleListGoods.getGoodsId()); mav.addObject("saleListGoods", saleListGoods); mav.addObject("goods", goods); mav.addObject("title", "評(píng)價(jià)商品"); mav.addObject("mainPage", "page/comment/commentPage"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } /** * 添加商品評(píng)價(jià) * * @param comment * @return */ @RequestMapping("/save") public String save(Comment comment, HttpSession session) { Customer currentCustomer = (Customer) session.getAttribute("currentCustomer"); comment.setCustomerId(currentCustomer.getId()); commentService.add(comment); SaleListGoods saleListGoods = saleListGoodsService.findById(comment.getSaleListGoodsId()); saleListGoods.setStatus(1); saleListGoodsService.update(saleListGoods); return "redirect:/comment/myComment/list/1"; } /** * 查看評(píng)價(jià)詳情 * * @param commentId * @return */ @RequestMapping("/commentDetails") public ModelAndView commentDetails(Integer commentId) { Comment comment = commentService.findById(commentId); comment.setGoods(goodsService.findById(comment.getGoodsId())); ModelAndView mav = new ModelAndView(); mav.addObject("comment", comment); mav.addObject("title", "查看評(píng)價(jià)詳情"); mav.addObject("mainPage", "page/comment/commentDetails"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } @RequestMapping("/customerComment/list/{id}") public ModelAndView customerComment(@PathVariable(value = "id", required = false) Integer page, Integer goodsId, HttpSession session) { ModelAndView mav = new ModelAndView(); Map<String, Object> map = new HashMap<>(16); int pageSize = 4; map.put("start", (page - 1) * pageSize); map.put("size", pageSize); map.put("goodsId", goodsId); List<Comment> commentList = commentService.list(map); for (Comment comment : commentList) { comment.setCustomer(customerService.findById(comment.getCustomerId())); } Long total = commentService.getCount(map); List<GoodsType> goodsTypeList = goodsTypeService.findByParentId(1); for (GoodsType goodsType : goodsTypeList) { goodsType.setSmallGoodsTypeList(goodsTypeService.findByParentId(goodsType.getId())); } Map<String, Object> map2 = new HashMap<>(16); map.put("typeId", goodsService.findById(goodsId).getType().getId()); List<Goods> goodsList = goodsService.list(map2); Collections.shuffle(goodsList); goodsList.remove(goodsService.findById(goodsId)); Goods goods = goodsService.findById(goodsId); this.setGoodsFavorite(goods,session); mav.addObject("allSaleTotal", saleListGoodsService.getSaleCount(goods.getId()) - returnListGoodsService.getReturnCount(goods.getId())); mav.addObject("goodsTypeList", goodsTypeList); mav.addObject("goods", goods); mav.addObject("commentList", commentList); mav.addObject("recommendGoodsList", goodsList); mav.addObject("total", total); mav.addObject("pageCode", PageUtil.genPagination3("/comment/customerComment/list", total, page, pageSize,goodsId)); mav.addObject("title", "客戶(hù)評(píng)價(jià)"); mav.addObject("mainPage", "page/comment/customerComment"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } /** * 給商品設(shè)置是否已收藏標(biāo)簽(0否,1是) * * @param goods */ private void setGoodsFavorite(Goods goods, HttpSession session) { Map<String, Object> map = new HashMap<>(16); map.put("customer", session.getAttribute("currentCustomer")); List<Favorite> favoriteList = favoriteService.list(map); for (Favorite favorite : favoriteList) { if (goods.getId().equals(favorite.getGoods().getId())) { goods.setIsFavorite(1); } } } }
package com.ledao.controller; import com.ledao.entity.Customer; import com.ledao.entity.Log; import com.ledao.entity.Pet; import com.ledao.service.CustomerService; import com.ledao.service.LogService; import com.ledao.service.PetService; import com.ledao.util.DateUtil; import com.ledao.util.PageUtil; import org.apache.commons.io.FileUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; import javax.servlet.http.HttpSession; import javax.validation.Valid; import java.io.File; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 前臺(tái)客戶(hù)Controller層 * * @author 指南針 * @company * @create 2022-01-30 14:57 */ @Controller @RequestMapping("/customer") public class CustomerController { @Value("${customerImageFilePath}") private String customerImageFilePath; @Resource private CustomerService customerService; @Resource private PetService petService; /** * 添加或者修改客戶(hù)信息 * * @param customer * @return */ @RequestMapping("/save") public ModelAndView save(Customer customer, @RequestParam("customerImage") MultipartFile file, HttpSession session) throws Exception { if (!file.isEmpty()) { if (customer.getId() != null) { FileUtils.deleteQuietly(new File(customerImageFilePath + customerService.findById(customer.getId()).getImageName())); } // 獲取上傳的文件名 String fileName = file.getOriginalFilename(); // 獲取文件的后綴 String suffixName = fileName.substring(fileName.lastIndexOf(".")); String newFileName = DateUtil.getCurrentDateStr2() + suffixName; FileUtils.copyInputStreamToFile(file.getInputStream(), new File(customerImageFilePath + newFileName)); customer.setImageName(newFileName); } if (customer.getId() == null) { customerService.add(customer); ModelAndView mav = new ModelAndView("redirect:/login"); mav.addObject("successRegister", true); mav.addObject("title", "用戶(hù)登錄"); mav.addObject("mainPage", "page/login"); mav.addObject("mainPageKey", "#b"); return mav; } else { customerService.update(customer); ModelAndView mav = new ModelAndView("redirect:/customer/personalCenter"); mav.addObject("successModify", true); mav.addObject("title", "個(gè)人中心"); mav.addObject("mainPage", "page/customer/personalCenterFirst"); customer.setImageName(customerService.findById(customer.getId()).getImageName()); session.setAttribute("currentCustomer", customer); mav.addObject("mainPageKey", "#b"); return mav; } } /** * 客戶(hù)登錄 * * @param customer * @param bindingResult * @param session * @return */ @RequestMapping("/login") public ModelAndView login(@Valid Customer customer, BindingResult bindingResult, HttpSession session) { ModelAndView mav = new ModelAndView(); if (bindingResult.hasErrors()) { mav.addObject("customer", customer); mav.addObject("error", bindingResult.getFieldError().getDefaultMessage()); mav.addObject("title", "用戶(hù)登錄"); mav.addObject("mainPage", "page/login"); } else { List<Customer> customerList = customerService.findByUserName(customer.getUserName()); if (customerList.size() != 0) { Customer currentCustomer = customerService.findByUserName(customer.getUserName()).get(0); if (currentCustomer.getPassword().equals(customer.getPassword())) { session.setAttribute("currentCustomer", currentCustomer); mav.addObject("successLogin", true); mav.addObject("title", "首頁(yè)"); mav.addObject("mainPage", "page/indexFirst"); } else { mav.addObject("successLogin", false); mav.addObject("title", "用戶(hù)登錄"); mav.addObject("mainPage", "page/login"); } } else { mav.addObject("successLogin", false); mav.addObject("title", "用戶(hù)登錄"); mav.addObject("mainPage", "page/login"); } } mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } /** * 退出登錄返回的頁(yè)面 * * @param session * @return */ @RequestMapping("/logout") public ModelAndView logout(HttpSession session) { session.invalidate(); ModelAndView mav = new ModelAndView(""); mav.addObject("title", "用戶(hù)登錄"); mav.addObject("mainPage", "page/indexFirst"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } /** * 跳轉(zhuǎn)到修改個(gè)人中心頁(yè)面 * * @return */ @RequestMapping("/personalCenter") public ModelAndView personalCenter() { ModelAndView mav = new ModelAndView(); mav.addObject("title", "個(gè)人中心"); mav.addObject("mainPage", "page/customer/personalCenterFirst"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } /** * 跳轉(zhuǎn)到修改個(gè)人信息頁(yè)面 * * @return */ @RequestMapping("/personalCenter/ModifyMessage") public ModelAndView personalCenterModifyMessage() { ModelAndView mav = new ModelAndView(); mav.addObject("title", "修改個(gè)人信息"); mav.addObject("mainPage", "page/customer/personalCenterModifyMessage"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } /** * 客戶(hù)注冊(cè)時(shí)判斷用戶(hù)名是否已經(jīng)存在 * * @param userName * @return */ @ResponseBody @RequestMapping("/existUserWithUserName") public Map<String, Object> existUserWithUserName(String userName) { Map<String, Object> resultMap = new HashMap<>(16); Long count = customerService.getCountByUserName(userName); if (count != 0) { resultMap.put("success", true); } else { resultMap.put("success", false); } return resultMap; } /** * 查看我的寵物 * * @return */ @RequestMapping("/myPet/list/{id}") public ModelAndView myPet(@PathVariable(value = "id", required = false) Integer page, HttpSession session) { ModelAndView mav = new ModelAndView(); Map<String, Object> map = new HashMap<>(16); int pageSize = 3; map.put("start", (page - 1) * pageSize); map.put("size", pageSize); map.put("customer", session.getAttribute("currentCustomer")); List<Pet> petList = petService.list(map); Long total = petService.getCount(map); mav.addObject("petList", petList); mav.addObject("total", total); mav.addObject("pageCode", PageUtil.genPagination2("/customer/myPet/list", total, page, pageSize)); mav.addObject("title", "我的寵物"); mav.addObject("mainPage", "page/customer/myPet"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } /** * 添加寵物信息頁(yè)面 * * @return */ @RequestMapping("/petAdd") public ModelAndView petAdd() { ModelAndView mav = new ModelAndView(); mav.addObject("title", "添加寵物信息"); mav.addObject("mainPage", "page/customer/petAdd"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } /** * 修改寵物信息頁(yè)面 * * @param petId * @return */ @RequestMapping("/petModify") public ModelAndView petModify(Integer petId) { Pet pet = petService.findById(petId); ModelAndView mav = new ModelAndView(); mav.addObject("pet", pet); mav.addObject("title", "修改寵物信息"); mav.addObject("mainPage", "page/customer/petModify"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } /** * 查看寵物信息頁(yè)面 * * @param petId * @return */ @RequestMapping("/petDetails") public ModelAndView petDetails(Integer petId) { Pet pet = petService.findById(petId); ModelAndView mav = new ModelAndView(); mav.addObject("pet", pet); mav.addObject("title", "查看寵物信息"); mav.addObject("mainPage", "page/customer/petDetails"); mav.addObject("mainPageKey", "#b"); mav.setViewName("index"); return mav; } }
到此這篇關(guān)于Springboot實(shí)例講解實(shí)現(xiàn)寵物醫(yī)院管理系統(tǒng)流程的文章就介紹到這了,更多相關(guān)Springboot寵物醫(yī)院管理系統(tǒng)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Java令牌Token登錄與退出的實(shí)現(xiàn)
這篇文章主要介紹了Java令牌Token登錄與退出的實(shí)現(xiàn),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2020-05-05Java中值類(lèi)型和引用類(lèi)型的比較與問(wèn)題解決
這篇文章主要給大家介紹了關(guān)于Java中值類(lèi)型和引用類(lèi)型的比較與問(wèn)題解決方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用Java具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2019-12-12SpringBoot+Mybatis分頁(yè)插件PageHelper實(shí)現(xiàn)分頁(yè)效果
這篇文章主要介紹了SpringBoot+Mybatis實(shí)現(xiàn)分頁(yè)效果,本案例是采用Mybatis分頁(yè)插件PageHelper實(shí)現(xiàn),本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2021-11-11java awt實(shí)現(xiàn)計(jì)算器功能
這篇文章主要為大家詳細(xì)介紹了java awt實(shí)現(xiàn)計(jì)算器功能,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2020-12-12Java基于裝飾者模式實(shí)現(xiàn)的染色饅頭案例詳解
這篇文章主要介紹了Java基于裝飾者模式實(shí)現(xiàn)的染色饅頭案例,簡(jiǎn)單描述了裝飾者模式的概念、原理及Java使用裝飾者模式的相關(guān)實(shí)現(xiàn)步驟、操作技巧與注意事項(xiàng),需要的朋友可以參考下2018-05-05java字符串中${}或者{}等的占位符替換工具類(lèi)
今天小編就為大家分享一篇關(guān)于java字符串中${}或者{}等的占位符替換工具類(lèi),小編覺(jué)得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來(lái)看看吧2018-12-12