栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

基于javaweb+mysql的宠物医院商城系统(java+Springboot+Jsp+maven+Mysql)

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

基于javaweb+mysql的宠物医院商城系统(java+Springboot+Jsp+maven+Mysql)

项目运行

环境配置:
Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)

项目技术:
Springboot+ SpringMVC + MyBatis + Jsp + Html+ JavaScript + JQuery + Ajax + maven等等

宠物医院与商城一体的系统





适用

课程设计,大作业,毕业设计,项目练习,学习演示等

	    
	    
	    
	    
	   @RequestMapping("/admin_Register")
	   public String admin_Register(Admin admin,Model model) {
		   int insertSelective = adminService.insertSelective(admin);
		   model.addAttribute("type",2);
	       return "login";
	   }
		
	   
	   
	         HttpSession session = request.getSession();
	         Doctor dt = (Doctor) session.getAttribute("DOCTOR");
	         if(dt != null){
	        	 messages.setDid(dt.getId());
	         }else{
	        	  return  "redirect:/login/index";
	         }
	     	
	     	messages.setType(type);
	     	//底层数据
	     	PageInfo pageInfo = messagesService.selectMessagesList(messages,page,size);
	     	//工作区数据
	     	messages.setTime(new Date());
	    	List list = messagesService.selectMessagesPai(messages);
	    	 model.addAttribute("mlist",list);
	    	 model.addAttribute("messagesList",pageInfo.getList());
	         model.addAttribute("pageInfo",pageInfo);
	         model.addAttribute("messages",messages);
				   }
		        }
	      
		     List selectByExample = patientService.selectByExample(se);
	    	if(selectByExample.size() >0 ) {
	    		List lmlist = messagesService.selectByExample(null);
	    		int j = 0 ;
	    		for (Messages me : lmlist) {
					if(me.getUid() == id) {
						   return j;
					}
	    			j++;
				}
	    	}
	        return -1;
    public String doctorList(Model model, Doctor doctor, @RequestParam(value="page",defaultValue="1")Integer page) {
    	if(doctor == null) {
    		doctor = new Doctor();
    	}
    	PageInfo pageInfo  =  doctorService.selectDoctorList(doctor,page,size);
    	
    	List list = pageInfo.getList();
        model.addAttribute("doctorList",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        model.addAttribute("doctor",doctor);
        return    "patient/doctorList";
    }
       
  	    @RequestMapping(value = "/userLogin")
	        HttpSession session = request.getSession();
	         Doctor dt = (Doctor) session.getAttribute("DOCTOR");
	         if(dt == null){
	        	  return  "redirect:/login/index";
	         }
				
	         Messages messages = new Messages();
//	         messages.setTime(new Date());
	         messages.setType(1);
	        	 Doctor doctor = new  Doctor();
	        	 doctor.setUsername(username);
	        	 doctor.setPasswoed(password);
	        	 List doctorlist = doctorService.selectDoctor(doctor);
	             if(doctorlist.size() <= 0){
	                 model.addAttribute("message","密码错误");
	                 model.addAttribute("type",type);
	                 return "login";
	             }
	             session.setAttribute("DOCTOR",doctorlist.get(0));
	             return "redirect:/doctor/index";
	         }
	         if(type == 3){
	        	 Patient patient = new  Patient();
	        	 patient.setUsername(username);
	        	 patient.setPassword(password);
	        	 List  list = patientService.selectPatient(patient);
	   	    	if(list.size() <= 0) {
	   	    	 model.addAttribute("message","密码错误");
        		 model.addAttribute("type",type);
        		 return "loginByPatient";
	   	    	}
	        	 session.setAttribute("PATIENT",list.get(0));
	        	 return "redirect:/api/doctorList1";
     
     private Integer size  = 8;//每页显示数量
     
     
     
     
     @RequestMapping("/tiaomessagelist")
     public String tiaomessagelist(@RequestBody  List mlist,Model model) {
    	 System.out.println(mlist.size());
    	 
         model.addAttribute("mlist",mlist);
         return    "doctor/messageList";
     }
     
     
     
     @RequestMapping("/index")
     public String index(Model model,HttpServletRequest request) {
		       return "ok";
		    }  
 
	     
	     
	     
	     @RequestMapping("/patientList")
	     public String messageList(Model model, Patient patient, @RequestParam(value="page",defaultValue="1")Integer page,HttpServletRequest request) {
	     	if(patient == null) {
	     		patient = new Patient();
	     	}
	        HttpSession session = request.getSession();
	         Doctor dt = (Doctor) session.getAttribute("DOCTOR");
	         if(dt == null){
	        	  return  "redirect:/login/index";
	         }
				
 	    @RequestMapping(value = "/doctorGeRenList")
 	    @ResponseBody
 	    public  Doctor  doctorGeRenList(Integer id) throws ParseException {
 	       Doctor doctor = doctorService.selectByPrimaryKey(id);
 	       return doctor;
 	    }  
  	    
 	    
	    @RequestMapping(value = "/doctorYuyueTime")
	    @ResponseBody
	    public  Map  doctorYuyueTime(Integer id) {
            Map map =  new HashMap();
	    	SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); 
	 	    Doctor doctor = doctorService.selectByPrimaryKey(id);
	 	    map.put("begin",sdf.format(doctor.getBegintime()));
		    map.put("end",sdf.format(doctor.getEndtime()));  
	        return  map;
	    }
	    
	    
	    @RequestMapping(value = "/patientUpatePage")
	    @ResponseBody
	    public  Patient  patientUpatePage(Integer id) {
	    	 Patient patient = null;
	         if(id != null) {
	         patient = patientService.selectByPrimaryKey(id);
	    	   Doctor doctor = doctorService.selectByPrimaryKey(id);
	    	   model.addAttribute("doctor",doctor);
	       }
	        return  "patient/doctorTime";
	    }
	    
	    @RequestMapping(value = "/doctorList")
	    @ResponseBody
	    public  List  doctorList(Integer sid) {
	       Doctor doctor = new Doctor();
	       doctor.setSid(sid);
	       List selectDoctor = doctorService.selectDoctor(doctor);
	       return selectDoctor;

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/927075.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号