基于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<Messages> pageInfo = messagesService.selectMessagesList(messages,page,size);
	     	//工作区数据
	     	messages.setTime(new Date());
	    	List<Messages> list = messagesService.selectMessagesPai(messages);
	    	 model.addAttribute("mlist",list);
	    	 model.addAttribute("messagesList",pageInfo.getList());
	         model.addAttribute("pageInfo",pageInfo);
	         model.addAttribute("messages",messages);
				   }
		        }
	      
		     List<Patient> selectByExample = patientService.selectByExample(se);
	    	if(selectByExample.size() >0 ) {
	    		List<Messages> 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<Doctor> pageInfo  =  doctorService.selectDoctorList(doctor,page,size);
    	
    	List<Doctor> list = pageInfo.getList();
        model.addAttribute("doctorList",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        model.addAttribute("doctor",doctor);
        return    "patient/doctorList";
    }
       /**
  		 *登录
        * @throws ParseException 
  		 */
  	    @RequestMapping(value = "/userLogin")
	        HttpSession session = request.getSession();
	         Doctor dt = (Doctor) session.getAttribute("DOCTOR");
	         if(dt == null){
	        	  return  "redirect:/login/index";
	         }
				/*
				 * PageInfo<Patient> pageInfo =
				 * patientService.selectPatientList(patient,1,size); List<Patient> list =
				 * pageInfo.getList(); List<Patient> list2 = new ArrayList<Patient>(); Messages
				 * messages = new Messages(); boolean pan = false; SimpleDateFormat sdf = new
				 * SimpleDateFormat("yyyy-MM-dd"); for (Patient pa : list) { if(pa.getPid() !=
				 * null && pa.getPid() != 0){ messages.setDid(dt.getId());
				 * messages.setUid(pa.getPid()); messages.setUsername(pa.getName());
				 * List<Messages> ml = messagesService.selectMessages(messages); if(ml.size() >
				 * 0 ){ Date time = ml.get(0).getTime(); pa.setUsername(sdf.format(time));
				 * pa.setPhone(dt.getName()); pa.setIdentitys(dt.getSname()); list2.add(pa); }
				 * 
				 * } } if(list2.size() <= 8) { pageInfo.setPages(1); }
				 */
	         Messages messages = new Messages();
//	         messages.setTime(new Date());
	         messages.setType(1);
	        	 Doctor doctor = new  Doctor();
	        	 doctor.setUsername(username);
	        	 doctor.setPasswoed(password);
	        	 List<Doctor> 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<Patient>  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;//每页显示数量
     
     
     
     /**
  	  * 修改信息
      * @param model
      * @return
      */
     @RequestMapping("/tiaomessagelist")
     public String tiaomessagelist(@RequestBody  List<Messages> 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";
	         }
				/*
				 * PageInfo<Patient> pageInfo =
				 * patientService.selectPatientList(patient,1,size); List<Patient> list =
         * @throws ParseException 
 	     */
 	    @RequestMapping(value = "/doctorGeRenList")
 	    @ResponseBody
 	    public  Doctor  doctorGeRenList(Integer id) throws ParseException {
 	       Doctor doctor = doctorService.selectByPrimaryKey(id);
 	       return doctor;
 	    }  
  	    
 	    /**
		   *时间格式转换
		 */
	    @RequestMapping(value = "/doctorYuyueTime")
	    @ResponseBody
	    public  Map<String,String>  doctorYuyueTime(Integer id) {
            Map<String,String> map =  new HashMap<String,String>();
	    	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;
	    }
	    
	    /**
			   *时间格式转换
	     * @throws ParseException 
	    @ResponseBody
	    public  List<Patient>   patienDel(Integer id) {
	    	if(id != null) {
	    		patientService.deleteByPrimaryKey(id);
	    	}
	    	List<Patient> selectByExample = patientService.selectByExample(null);
	        return  selectByExample;
	    }
	    
	    /**
		   *患者信息查看
		 */
	    @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<Doctor>  doctorList(Integer sid) {
	       Doctor doctor = new Doctor();
	       doctor.setSid(sid);
	       List<Doctor> selectDoctor = doctorService.selectDoctor(doctor);
	       return selectDoctor;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,我可以给你简单介绍一下一个基于JavawebSpring+jsp+Servlet+MySql的超市订单管理系统的大致架构和功能模块。 该系统主要分为前台和后台两个部分,前台是顾客使用的界面,可以进行商品浏览、购物车管理、订单提交等操作;后台是管理员使用的界面,可以进行商品管理、订单管理、用户管理等操作。 系统的技术架构主要采用Spring框架作为整个项目的基础框架,集成了MyBatis持久化框架、SpringMVC框架和Shiro安全框架等技术,通过Maven进行项目管理和依赖管理,使用Tomcat作为Web服务器,最终实现了一个高效、稳定、安全、易于维护的超市订单管理系统。 下面简单列举一下系统的功能模块: 1. 用户注册和登录:用户可以通过注册账号并登录系统来进行商品浏览、购物车管理、订单提交等操作。 2. 商品管理:管理员可以在后台管理界面中管理商品信息,包括商品的添加、修改、删除、查询等操作。 3. 订单管理:管理员可以在后台管理界面中管理订单信息,包括订单的查询、修改、删除等操作。 4. 用户管理:管理员可以在后台管理界面中管理用户信息,包括用户的查询、添加、修改、删除等操作。 5. 购物车管理:用户可以将感兴趣的商品添加到购物车中,也可以在购物车中修改、删除商品信息。 6. 支付和发货:用户可以在确认订单信息无误后进行支付操作,管理员可以在后台管理界面中进行订单发货操作。 7. 安全权限控制:系统通过Shiro框架实现了对用户登录和权限控制的安全管理,确保系统的数据安全性和稳定性。 以上仅是系统的简单介绍,具体的实现和细节还需要根据具体的需求进行设计和开发。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值