基于javaweb+mysql的springboot宠物医院与商城一体的系统(java+springboot+jsp+maven+mysql)

基于javaweb+mysql的springboot宠物医院与商城一体的系统(java+springboot+jsp+maven+mysql)

运行环境

Java≥8、MySQL≥5.7

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

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

功能说明

基于javaweb+mysql的SpringBoot宠物医院与商城一体的系统(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(value = "/patientSave")

public  String  patientSave(Patient patient) {

patientService.insertSelective(patient);

return  "loginByPatient";

/**

* 判断患者账号

*/

@RequestMapping("/panzhanghao")

@ResponseBody

public Map<String,String> panzhanghao(Model model, String zhanghao) {

Map<String, String> map =  new HashMap<String, String>();

PatientExample se  = new  PatientExample();
* @return

*//*

@RequestMapping("/sessionInvalidate")

public String boot(HttpServletRequest request,Model model) {

HttpSession session = request.getSession();

Integer type = (Integer) session.getAttribute("type");

if(type == null){

type=1;

model.addAttribute("type",type);

session.invalidate();   //session销毁

return "behind/login";

*//**

*  管理员修改密码界面

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")

@ResponseBody

patient++;

//预约总数

MessagesExample me  = new  MessagesExample();

MessagesExample.Criteria mecriteria = me.createCriteria();

mecriteria.andDidEqualTo(dt.getId());

int  messages = messagesService.countByExample(me);

model.addAttribute("doctor",doctor);

model.addAttribute("section",section);

model.addAttribute("patient",patient);

model.addAttribute("messages",messages);

PageInfo<Doctor> pageInfo  =  doctorService.selectDoctorList(null,1,4);


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);

}else{

map.put("pan","ok");

return    map;

/**

* 医生添加

* @param model

* @param zixun

* @return

*/

@RequestMapping("/zixunInsert")


if(id != null) {

patient = patientService.selectByPrimaryKey(id);

return  patient;

/**

*患者信息修改

*/

@RequestMapping(value = "/patientUpdate")

@ResponseBody

public  Patient  patientUpdate(@RequestBody Patient patient) {

patientService.updateByPrimaryKeySelective(patient);

return  null;


/**

* 后台登陆界面

*/

@RequestMapping("/index")

public String index(Integer type,Model model) {

if(type == null){

type = 1;

model.addAttribute("type",type);

return "login";

/**

* 后台登陆界面

*/

if(type == null){

type = 1;

model.addAttribute("type",type);

return "behind/login";

*//**

* 登陆验证

* @return

*//*

@RequestMapping("/verificatio")

public String signin(String username, String password, Integer type, HttpServletRequest request,Model model) {

HttpSession session = request.getSession();

criteria.andUsernameEqualTo(zhanghao);

List<Doctor> selectByExample = doctorService.selectByExample(se);

if(selectByExample.size() > 0){

map.put("pan","err");

}else{

map.put("pan","ok");

return    map;

/**

* 医生添加

* @param model

* @param zixun

* @return

*/


/**

*时间格式转换

*/

@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;

/**

* 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);

messages.setUid(patient1.getPid());

PageInfo<Messages> pageInfo = messagesService.selectMessagesList(messages, 1, size);

model.addAttribute("doctorList",pageInfo.getList());

model.addAttribute("pageInfo",pageInfo);

model.addAttribute("patient",patient);

return    "patient/patientList";


*/

@RequestMapping("/verificatio")

public String verificatio(String username, String password, Integer type, HttpServletRequest request,Model model) {

HttpSession session = request.getSession();

session.setAttribute("type",type);

//类型为1是医院 2是管理员

if(type == 1){

Doctor doctor = new  Doctor();

doctor.setUsername(username);

doctor.setPasswoed(password);

List<Doctor> doctorlist = doctorService.selectDoctor(doctor);

if(doctorlist.size() <= 0){

model.addAttribute("message","密码错误");

return "behind/merchant/mibaoUptate";

*//**

* 修改密码

*//*

@RequestMapping("/mimaUpate")

@ResponseBody

public Map<String,String> passwordUpate(Model model, String  mima, String  mibao, String zhanghao) {

Map<String, String> map =  new HashMap<String, String>();

Merchant me = new Merchant();

me.setZhanghao(zhanghao);

me.setMibao(mibao);

List<Merchant> list = merchantService.selectMerchant(me);


@RequestMapping("/mimaPageUptate")

public String  mimaPageUptate(Integer type,Model model) {

//1医生  2 管理员

if(type == 1 ) {

return "doctorRegister";

return "adminRegister";

/**

*  医生注册界面

*/

@RequestMapping("/doctorRegisterPage")

public String  doctorRegister(Model model) {

model.addAttribute("sectionlist", sectionlist);

//科室详情

Section se1 = sectionService.selectByPrimaryKey(doctor.getSid());

if(se1 != null) {

Section  section = new  Section();

section.setPid(se1.getPid());

section.setType(2);

sectionlist2 = sectionService.selectByExample(section);

model.addAttribute("sectionlist2", sectionlist2);

model.addAttribute("se1", se1);

return  "doctor/doctorUptate";

*/

@RequestMapping("/sessionInvalidate")

public String boot(HttpServletRequest request,Model model) {

HttpSession session = request.getSession();

Integer type = (Integer) session.getAttribute("type");

if(type == null){

type=1;

if(type == 3){

model.addAttribute("type",type);

session.invalidate();   //session销毁

return "loginByPatient";

model.addAttribute("type",type);

session.invalidate();   //session销毁

/**

*登录验证

* @throws ParseException

*/

@RequestMapping(value = "/userLoginView")

@ResponseBody

public  String  userLoginView(HttpServletRequest request) throws ParseException {

HttpSession session = request.getSession();

Patient  patient =(Patient) session.getAttribute("USER");

System.out.println("*********登陆验证********");

System.out.println(patient);

if(patient != null) {

return  "ok";

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值