Java项⽬:宠物医院预约管理系统设计和实现
(java+springboot+mysql+ssm)源码获取:博客⾸页 "资源" ⾥下载!
项⽬使⽤java SpringMVC、springboot mybatis、layui为核⼼技术编写
⾸页登录有可爱的⼩猫咪:
系统主页主要功能有会员信息、宠物管理、预约管理和统计分析等:
预约列表:
医院管理:
宠物档案管理:
监控标准医⽣和⽤户:
1/**
2 * 监控标准
3 */
4@Controller("UserStandardController")
6public class UserStandardController {
7 @Autowired
8 private StandardService standardService;
9
10 private final Logger logger = Class());
11 /**
12 * 医⽣列表页⾯user/standardListDoctor.html
spring mvc和boot区别13 */
14 @RequestMapping("/standardListDoctor")
15 public String standardListDoctor() {
16 return "user/standardListDoctor";
17 }
18 /**
19 * 普通⽤户页⾯user/standardList.html
20 */
21 @RequestMapping("/standardList")
22 public String standardList() {
23 return "user/standardList";
24 }
25 /**
26 * 普通⽤户返回查询数据
27 */
28 @RequestMapping("/getAllByLimit")
29 @ResponseBody
30 public Object getAllByLimit(Standard pojo) {
31 AllByLimit(pojo);
32 }
33 /**
34 * 医⽣返回查询数据
35 */
36 @RequestMapping("/getAllByLimitDoctor")
37 @ResponseBody
38 public Object getAllByLimitBaoJie(Standard pojo) {
39 AllByLimit(pojo);
40 }
41
42 /**
43 * 根据id删除
44 */
45 @RequestMapping(value = "/del")
46 @ResponseBody
47 @Transactional
48 public String del(Long id) {
49 try {
50 standardService.deleteById(id);
51 return "SUCCESS";
52 } catch (Exception e) {
53 ("删除异常", e);
54 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
55 return "ERROR";
56 }
57 }
58
59 /**
60 * 添加页⾯ user/standardAdd.html
61 */
62 @RequestMapping(value = "/add")
63 public String add() {
64 return "user/standardAdd";
65 }
66
67 /**
68 * 插⼊数据库
69 */
71 @ResponseBody
72 @Transactional
73 public String doAdd(Standard pojo) {
74 try {
75 standardService.add(pojo);
76 return "SUCCESS";
77 } catch (Exception e) {
78 ("添加异常", e);
79 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
80 return "ERROR";
81 }
82 }
83}
宠物⽇志业务操作:
1/**
2 * 宠物⽇志
3 */
4@Controller("UserPetDailyController")
5@RequestMapping("/user/petDaily")
6public class UserPetDailyController {
7 @Autowired
8 private PetDailyService petDailyService;
9 @Autowired
10 private PetService petService;
11
12 private final Logger logger = Class());
13 /**
14 * 医⽣宠物⽇志页⾯user/petDailyListDoctor.html
15 */
16 @RequestMapping("/petDailyListDoctor")
17 public String petListDoctor(Long petId, Model model) {
18 if (petId!=null){
19 model.addAttribute("petId", petId);
20 }else {
21 model.addAttribute("petId", "petId");
22 }
23 return "user/petDailyListDoctor";
24 }
25
26 /**
27 * 普通⽤户宠物⽇志页⾯user/petDailyList.html
28 */
29 @RequestMapping("/petDailyList")
30 public String petDailyList(Long petId, Model model) {
31 if (petId!=null){
32 model.addAttribute("petId", petId);
33 }else {
34 model.addAttribute("petId", "petId");
35 }
36 return "user/petDailyList";
37 }
38 /**
39 * 普通⽤户返回查询数据
40 */
41 @RequestMapping("/getAllByLimit")
42 @ResponseBody
43 public Object getAllByLimit(PetDaily pojo) {
44 Subject subject = Subject();
45 User user = (User) Principal();
46 pojo.Id());
47 AllByLimit(pojo);
48 }
49
50 /**
51 * 医⽣返回查询数据
52 */
53 @RequestMapping("/getAllByLimitDoctor")
54 @ResponseBody
55 public Object getAllByLimitDoctor(PetDaily pojo) {
56 AllByLimit(pojo);
57 }
58
59 /**
60 * 删除
61 */
62 @RequestMapping(value = "/del")
63 @ResponseBody
64 @Transactional
65 public String del(Long id) {
66 try {
67 petDailyService.deleteById(id);
68 return "SUCCESS";
69 } catch (Exception e) {
70 ("删除异常", e);
71 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
72 return "ERROR";
73 }
74 }
75
76 /**
77 * 添加页⾯user/petDailyAdd.html
78 */
79 @RequestMapping(value = "/add")
80 public String add(Model model) {
81 Subject subject = Subject();
82 User user = (User) Principal();
83 Pet pet = new Pet();
84 pet.Id());
85 pet.setPage(1);
86 pet.setLimit(100);
87 MMGridPageVoBean<Pet> voBean = (MMGridPageVoBean<Pet>) AllByLimit(pet);
88 List<Pet> rows = Rows();
89 // 获取到该⽤户下所有的宠物
90 model.addAttribute("pets", rows);
91 return "user/petDailyAdd";
92 }
93
94 /**
95 * 插⼊数据库
96 */
97 @RequestMapping(value = "/doAdd")
98 @ResponseBody
99 @Transactional
100 public String doAdd(PetDaily pojo) {
101 Subject subject = Subject();
102 User user = (User) Principal();
103 try {
104 pojo.Id());
105 pojo.setCreateTime(new Date());
106 petDailyService.add(pojo);
107 return "SUCCESS";
108 } catch (Exception e) {
109 ("添加异常", e);
110 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
111 return "ERROR";
112 }
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论