Java项目:宠物医院预约挂号系统(java+JSP+Spring+SpringBoot+MyBatis+html+layui+maven+Mysql)
源码获取:博客首页 "资源" 里下载!
一、项目简述
功能包括:
用户分为宠物,医生,管理员,宠物主人可进行注册选择医生挂号,选择日期,选择号源,医生可进行宠物接诊,管理员可对宠物,医生信息的维护等等功能。
二、项目运行
环境配置:
Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)
项目技术:
JSP +Spring + SpringBoot + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等
医生管理控制层:
/*** 医生端*/
@Controller
@RequestMapping("/doctor")
public class DoctorController {@Autowiredprivate AdminService adminService;@Autowiredprivate DoctorService doctorService;@Autowiredprivate SectionService sectionService;@Autowiredprivate PatientService patientService;@Autowiredprivate MessagesService messagesService;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) {HttpSession session = request.getSession();Doctor dt = (Doctor) session.getAttribute("DOCTOR");if(dt == null) {return "redirect:/login/index"; }int doctor = doctorService.countByExample(null); //医生总数int section = sectionService.count(); //科室总数//患者总数int patient = 0;List<Patient> selectByExample = patientService.selectByExample(null);Messages mess = new Messages();for (Patient pa : selectByExample) {if(pa.getName() != null) {mess.setDid(dt.getId());mess.setUsername(pa.getName());List<Messages> selectMessages = messagesService.selectMessages(mess);if(selectMessages.size() > 0 ){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);if(pageInfo.getList() != null && pageInfo.getList().size() >0 ) {List<Doctor> list = pageInfo.getList();StringBuffer sb = new StringBuffer();StringBuffer shu = new StringBuffer();int v = list.size()-1;for(int i=0;i<list.size();i++) {if(v==i) {sb.append(list.get(i).getName());shu.append(list.get(i).getYipeoples());}else {sb.append(list.get(i).getName()+",");shu.append(list.get(i).getYipeoples()+",");}}model.addAttribute("name",sb.toString());model.addAttribute("nu",shu.toString());}return "doctor/index";}/*** 修改信息* @param model* @return*/@RequestMapping("/doctorUptatePage")public String doctorUptatePage(Model model,HttpServletRequest request) {HttpSession session = request.getSession();Doctor dt = (Doctor) session.getAttribute("DOCTOR");if(dt != null) {Doctor doctor = doctorService.selectByPrimaryKey(dt.getId());List<Section> sectionlist2 = null;model.addAttribute("doctor",doctor);//科室Section se = new Section();se.setType(1);List<Section> sectionlist = sectionService.selectByExample(se);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("/messageTime")public String messageTime(String name,Model model,HttpServletRequest request) {HttpSession session = request.getSession();Doctor dt = (Doctor) session.getAttribute("DOCTOR");if(name != null) {Messages mess = new Messages();mess.setDid(dt.getId());mess.setUsername(name);List<Messages> selectMessages = messagesService.selectMessagesTWO(mess);model.addAttribute("messagesList", selectMessages);}return "doctor/messageTime";}/*** 修改医生信息*/@RequestMapping("/admindoctorUptate")public String adminUptatePassword(Doctor doctor,Model model) {if(doctor != null && doctor.getId() != null) {if(doctor.getSid() != null) {Section section = sectionService.selectByPrimaryKey(doctor.getSid());doctor.setSid(section.getId());doctor.setSname(section.getName());}doctorService.updateByPrimaryKeySelective(doctor);}return "redirect:/doctor/index";}/*** 预约信息列表*/@RequestMapping("/messageList")public String doctorList(Model model, Messages messages, @RequestParam(value="page",defaultValue="1")Integer page,Integer type,HttpServletRequest request) {if(messages == null) {messages = new Messages();}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);model.addAttribute("type",type);return "doctor/messageList";}/***医生列表查询*/@RequestMapping(value = "/messageAjax")@ResponseBodypublic List<Messages> doctorList(HttpServletRequest request) {Messages messages = new Messages();HttpSession session = request.getSession();Doctor dt = (Doctor) session.getAttribute("DOCTOR");messages.setDid(dt.getId());messages.setType(1);messages.setTime(new Date());PageInfo<Messages> pageInfo2 = messagesService.selectMessagesListDemo(messages,1,99);return pageInfo2.getList();} /***医生列表查询*/@RequestMapping(value = "/messagesQundingUptate")@ResponseBodypublic String messagesQundingUptate(Integer id) {if(id != null) {Messages messages = new Messages();messages.setId(id);messages.setType(3); //3表示预约成功messagesService.updateByPrimaryKeySelective(messages);Messages selectByPrimaryKey = messagesService.selectByPrimaryKey(id);Messages mes = new Messages();mes.setType(1);mes.setTime(new Date());mes.setDid(selectByPrimaryKey.getDid());List<Messages> list = messagesService.selectMessagesPai(mes);for (int i = 0; i < list.size(); i++) {list.get(i).setPai(i+1);messagesService.updateByPrimaryKeySelective(list.get(i));}}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 =* 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);messages.setDid(dt.getId()); PageInfo<Messages> pageInfo = messagesService.selectMessagesList(messages, 1, size);model.addAttribute("doctorList",pageInfo.getList());model.addAttribute("pageInfo",pageInfo);model.addAttribute("patient",patient);return "doctor/patientList";}/***预约信息列表* @throws ParseException */@RequestMapping(value = "/tiaozhuanList")@ResponseBodypublic String messagesList(@RequestParam("xiao")Integer xiao,@RequestParam("da")Integer da) {Messages message = new Messages();if(xiao != null & da != null) {Messages mexiao = messagesService.selectByPrimaryKey(xiao);Integer px = mexiao.getPai();Messages meda = messagesService.selectByPrimaryKey(da);mexiao.setPai(meda.getPai());meda.setPai(px);messagesService.updateByPrimaryKeySelective(mexiao);messagesService.updateByPrimaryKeySelective(meda);}return null;}/*** 确定预约*/@RequestMapping("/messagesUptate")public String messagesUptate(Integer id) {if(id != null) {Messages messages = new Messages();messages.setId(id);messages.setType(3); //3表示预约成功messagesService.updateByPrimaryKeySelective(messages);}return "redirect:/doctor/messageList?type=1";}/*** 取消*/@RequestMapping("/messagesQuXiao")public String messagesQuXiao(Integer id) {if(id != null) {Messages messages = new Messages();messages.setId(id);messages.setType(2); //2取消预约messagesService.updateByPrimaryKeySelective(messages);}return "redirect:/doctor/messageList?type=1";}/*** 退号*/@RequestMapping("/messagesTui")public String messagesTui(Integer id) {if(id != null) {Messages messages = new Messages();messages.setId(id);messages.setType(4); //4退号失败messagesService.updateByPrimaryKeySelective(messages);}return "redirect:/doctor/messageList?type=3";}}
登录控制层:
/*** 登录控制层*/
@Controller
@RequestMapping("/login")
public class LoginController {@Autowiredprivate AdminService adminService;@Autowiredprivate DoctorService doctorService;@Autowiredprivate SectionService sectionService;@Autowiredprivate PatientService patientService;@Value("${fileUrl}") //在配置文件中获取文件的保存路径private String filePath;/*** 后台登陆界面* @throws IOException */@RequestMapping("/afterView")public String afterLogin(Integer type,Model model) {if(type == null) {type = 1;}model.addAttribute("type",type);return "login";}/*** 后台登陆界面*/@RequestMapping("/index")public String index(Integer type,Model model) {if(type == null){type = 1;}model.addAttribute("type",type);return "login";}/*** 后台登陆界面*/@RequestMapping("/font/index")public String fontIndex(Integer type,Model model) {if(type == null){type = 3;}model.addAttribute("type",type);return "loginByPatient";}/* public static void main(String[] args) {String filename ="C:\\Users\\Administrator\\Pictures\\项目图片\\1156.jpg_wh1200.jpg";int indexOf = filename.indexOf(".");String substring = filename.substring(indexOf); System.out.println(substring);}*//*** 医生图片上传* @param mufile* @param id* @return* @throws IOException*/@RequestMapping(value ="/zixunAdd")@ResponseBodypublic Map<String, Object> zixunAdd(@RequestParam("mf")MultipartFile mufile,@RequestParam("id")Integer id) throws IOException{Map<String, Object> map = new HashMap<String, Object>();String random = StringRandom.getRandom();String filename = mufile.getOriginalFilename();//随机字符+原图片名用作新的图片名filename = random+".jpg";try {//文件保存路径 D:/xxxx/xxxx/File file = new File(filePath+filename);//判断父级文件是否存在if (!file.getParentFile().exists()) {file.getParentFile().mkdir();}mufile.transferTo(file);} catch (IllegalStateException | IOException e) {e.printStackTrace();}Doctor doctor = new Doctor(); if(id != -1){doctor.setId(id);doctor.setImg("/files/"+filename);doctorService.updateByPrimaryKeySelective(doctor);}else {//添加图片路径doctor.setImg("/files/"+filename);doctorService.insertSelective(doctor);System.out.println("id:"+doctor.getId());map.put("id",doctor.getId());}return map;}/*** 判断管理员账号*/@RequestMapping("/sectionxList")@ResponseBodypublic List<Section> sectionxList(Model model, Integer id) {List<Section> selectByExample = null;if(id != null) {Section section = new Section();section.setPid(id);selectByExample = sectionService.selectByExample(section);}return selectByExample;} /*** 判断管理员账号*/@RequestMapping("/mimaUpate")@ResponseBodypublic Map<String,String> passwordUpate(Model model, String zhanghao) {Map<String, String> map = new HashMap<String, String>();Admin ad = new Admin();ad.setUsername(zhanghao);List<Admin> selectAdmin = adminService.selectAdmin(ad);if(selectAdmin.size() > 0){map.put("pan","err");}else{map.put("pan","ok");}return map;}/*** 判断医生账号*/@RequestMapping("/panzhanghao")@ResponseBodypublic Map<String,String> panzhanghao(Model model, String zhanghao) {Map<String, String> map = new HashMap<String, String>();DoctorExample se = new DoctorExample();DoctorExample.Criteria criteria = se.createCriteria();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("/zixunInsert")public String zixunInsert(Model model,Doctor doctor){if(doctor.getId() != null){if(doctor.getSid() != null) {Section selectByPrimaryKey = sectionService.selectByPrimaryKey(doctor.getSid());doctor.setSname(selectByPrimaryKey.getName());}doctorService.updateByPrimaryKeySelective(doctor);}model.addAttribute("type",1);return "login";}/*** 管理员注册界面*/@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) {List<Section> sectionlist2 = null;Section se = new Section();se.setType(1);List<Section> sectionlist = sectionService.selectByExample(se);if(sectionlist.size() > 0 ) {//科室详情Section section = new Section();section.setPid(sectionlist.get(0).getId());section.setType(2);sectionlist2 = sectionService.selectByExample(section);}model.addAttribute("sectionlist", sectionlist);model.addAttribute("sectionlist2", sectionlist2);return "doctorRegister";}/*** 管理员注册*/@RequestMapping("/admin_Register")public String admin_Register(Admin admin,Model model) {int insertSelective = adminService.insertSelective(admin);model.addAttribute("type",2);return "login";}/*** 登陆验证* @return*/@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","密码错误");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";}Admin admin = new Admin();admin.setUsername(username);admin.setPassword(password);List<Admin> adminlist = adminService.selectAdmin(admin);if(adminlist.size() <= 0){model.addAttribute("message","密码错误");model.addAttribute("type",type);return "login";}session.setAttribute("ADMIN",adminlist.get(0));return "redirect:/admin/index";}/*** 退出登录* @param request* @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;}if(type == 3){model.addAttribute("type",type);session.invalidate(); //session销毁return "loginByPatient";}model.addAttribute("type",type);session.invalidate(); //session销毁return "login";}/**//*** 跳转忘记密码界面*//*@RequestMapping("/mimaPageUptate")public String passwordUpate() {return "behind/merchant/mibaoUptate";}*//*** 修改密码*//*@RequestMapping("/mimaUpate")@ResponseBodypublic 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);if(list.size() > 0){Merchant me2 = new Merchant();me2.setId(list.get(0).getId());me2.setMima(mima);merchantService.updateByPrimaryKeySelective(me2);map.put("pan","ok");}else{map.put("pan","err");}return map;}*//*** 后台登陆界面* @return*//*@RequestMapping("/afterView")public String afterLogin(Integer type,Model model) {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();session.setAttribute("type",type);//类型为1是商户后台 2是管理员if(type == 1){Merchant merchant = new Merchant();merchant.setZhanghao(username);merchant.setMima(password);merchant.setState(1);List<Merchant> merchants = merchantService.selectMerchant(merchant);if(merchants.size() <= 0){model.addAttribute("message","密码错误");model.addAttribute("type",type);return "behind/login";}session.setAttribute("MERCHANT",merchants.get(0));return "redirect:/merchant/index";}Admin admin = new Admin();admin.setUsername(username);admin.setPassword(password);List<Admin> adminlist = adminService.selectAdmin(admin);if(adminlist.size() <= 0){model.addAttribute("message","密码错误");model.addAttribute("type",type);return "behind/login";}session.setAttribute("ADMIN",adminlist.get(0));return "redirect:/admin/index";}*//*** 退出登录* @param request* @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";}*//*** 管理员修改密码界面* @return*//*@RequestMapping("/adminUptatePage")public String adminUptatePage(Model model) {return "behind/admin/adminUptate";}*//*** 商户修改密码界面* @return*//*@RequestMapping("/merchantUptate")public String merchantUptate(Model model) {return "behind/merchant/merchantUptate";}
*/}
后端管理员控制层:
/*** 后端管理员控制层*/
@Controller
@RequestMapping("/admin")
public class AdminController {@Autowiredprivate AdminService adminService;@Autowiredprivate SectionService sectionService;@Autowiredprivate BannersService bannersService; @Autowiredprivate DoctorService doctorService;@Autowiredprivate PatientService patientService;@Autowiredprivate MessagesService messagesService;private Integer size = 6;//每页显示数量@Value("${fileUrl}") //在配置文件中获取文件的保存路径private String filePath;/*** 导入* @param file* @param response* @throws IOException */@RequestMapping("/excelInput")public String excelInput(MultipartFile file,HttpServletResponse response) throws IOException {String sb = file.getOriginalFilename();List<String[]> jieExcel = ExcelInput.jieExcel(file.getInputStream(), sb.substring(sb.indexOf(".")+1));for (String[] strings : jieExcel) {System.out.println(Arrays.toString(strings)); }return "redirect:/admin/index";}/*** 导出* * @param file* @param response*/@RequestMapping("/xiazai")public void excelString(HttpServletRequest request,HttpServletResponse response) {try {response.setCharacterEncoding("utf-8");//content-type类型是告诉页面要响应内容的类型,以及字符编码,页面要以什么方式打开response.setContentType("application/force-download");// 设置强制下载不打开//Content-Disposition是MIMI协议的扩展,浏览器以什么方式处理wenjianresponse.setHeader("Content-Disposition", "attachment; fileName=exportFile.xlsx");String[] title = new String[]{"姓名","科室id","科室","日期"};List<Doctor> list = doctorService.selectByExample(null);Workbook wo = ExcelUtils.getExcel("xlsx",title,list);wo.write(response.getOutputStream());//Files.copy(file, response.getOutputStream()); } catch (IOException e) {System.out.println("发生异常");e.printStackTrace();}}@RequestMapping("/index")public String index(Model model) {int doctor = doctorService.countByExample(null); //医生总数int section = sectionService.countByExample(null); //科室总数int patient = patientService.countByExample(null); //患者总数int messages = messagesService.countByExample(null); //预约总数model.addAttribute("doctor",doctor);model.addAttribute("section",section);model.addAttribute("patient",patient);model.addAttribute("messages",messages);PageInfo<Doctor> pageInfo = doctorService.selectDoctorList(null,1,4);if(pageInfo.getList() != null && pageInfo.getList().size() >0 ) {List<Doctor> list = pageInfo.getList();StringBuffer sb = new StringBuffer();StringBuffer shu = new StringBuffer();int v = list.size()-1;for(int i=0;i<list.size();i++) {if(v==i) {sb.append(list.get(i).getName());shu.append(list.get(i).getYipeoples());}else {sb.append(list.get(i).getName()+",");shu.append(list.get(i).getYipeoples()+",");}}model.addAttribute("name",sb.toString());model.addAttribute("nu",shu.toString());}return "admin/index";}/*** 管理员修改密码界面* @return*/@RequestMapping("/adminUptatePage")public String adminUptatePage(Model model) {return "admin/adminUptate";}/*** 修改密码 */@RequestMapping("/adminUptatePassword")public String adminUptatePassword(Model model,Admin admin,HttpServletRequest request) {HttpSession session = request.getSession();Admin ad = (Admin) session.getAttribute("ADMIN");if(ad != null && admin.getPassword() != null){admin.setId(ad.getId());adminService.updateByPrimaryKeySelective(admin);}return "redirect:/admin/index";}/*** 坐诊时间设置界面*/@RequestMapping("/doctorTimePage")public String doctorTimePage(Integer id,Model model) {if(id != null) {Doctor doctor = doctorService.selectByPrimaryKey(id);model.addAttribute("doctor",doctor);}return "admin/doctorTime";}/*** 坐诊时间设置界面* @throws ParseException */@RequestMapping("/doctorTimeUpdate")public String doctorTimeUpdate(Integer id,Model model,String begindate,String enddate,String begintime,String endtime) throws ParseException {if(id != null) {SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("HH:mm"); Doctor doctor = new Doctor();doctor.setId(id);doctor.setBegindate(simpleDateFormat.parse(begindate)); doctor.setEnddate(simpleDateFormat.parse(enddate));doctor.setBegintime(simpleDateFormat2.parse(begintime));doctor.setEndtime(simpleDateFormat2.parse(endtime)); doctorService.updateByPrimaryKeySelective(doctor);}return "redirect:/admin/doctorList";} /*** 修改医生信息*/@RequestMapping("/admindoctorUptate")public String adminUptatePassword(Doctor doctor,Model model) {if(doctor != null && doctor.getId() != null) {if(doctor.getSid() != null) {Section section = sectionService.selectByPrimaryKey(doctor.getSid());doctor.setSid(section.getId());doctor.setSname(section.getName());}doctorService.updateByPrimaryKeySelective(doctor);}return "redirect:/admin/doctorList";}/*** 删除医生信息*/@RequestMapping("/doctorDelect")public String doctorDelect(Integer id,Model model) {if(id != null) {doctorService.deleteByPrimaryKey(id);}return "redirect:/admin/doctorList";}/*** 医生注册界面*/@RequestMapping("/doctorAddPage")public String doctorAddPage(Model model) {List<Section> sectionlist2 = null;Section se = new Section();se.setType(1);List<Section> sectionlist = sectionService.selectByExample(se);if(sectionlist.size() > 0 ) {//科室详情Section section = new Section();section.setPid(sectionlist.get(0).getId());section.setType(2);sectionlist2 = sectionService.selectByExample(section);}model.addAttribute("sectionlist", sectionlist);model.addAttribute("sectionlist2", sectionlist2);return "admin/doctorAdd";}@RequestMapping("/admindoctorAdd")public String admindoctorAdd(Doctor doctor,Model model) {if(doctor.getId() != null){if(doctor.getSid() != null) {Section selectByPrimaryKey = sectionService.selectByPrimaryKey(doctor.getSid());doctor.setSname(selectByPrimaryKey.getName());}doctorService.updateByPrimaryKeySelective(doctor);}return "redirect:/admin/doctorList";}/*** 医生列表*/@RequestMapping("/doctorList")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 "admin/doctorList";}/*** 修改医生信息界面* @return*/@RequestMapping("/doctorUptatePage")public String doctorUptatePage(Model model,Integer id) {if(id != null) {Doctor doctor = doctorService.selectByPrimaryKey(id);List<Section> sectionlist2 = null;model.addAttribute("doctor",doctor);//科室Section se = new Section();se.setType(1);List<Section> sectionlist = sectionService.selectByExample(se);model.addAttribute("sectionlist", sectionlist);//科室详情Section se1 = sectionService.selectByPrimaryKey(doctor.getSid());Section section = new Section();if(se1 != null) {section.setPid(se1.getPid());section.setType(2);sectionlist2 = sectionService.selectByExample(section);}else {if(sectionlist.size() >0 ) {section.setPid(sectionlist.get(0).getId()); section.setType(2);sectionlist2 = sectionService.selectByExample(section);}se1 = new Section();}model.addAttribute("sectionlist2", sectionlist2);model.addAttribute("se1", se1);}return "admin/doctorUptate";}/*** 科室列表*/@RequestMapping("/sectionList")public String sectionList(Model model, Section section, @RequestParam(value="page",defaultValue="1")Integer page) {if(section == null) {section = new Section();}section.setType(1);//1 科室PageInfo<Section> pageInfo = sectionService.selectSectionListt(section,page,size);List<Section> list = pageInfo.getList();List<Section> list2 = new ArrayList<Section>();Section cs = new Section();for (Section se : list) {cs.setPid(se.getId());List<Section> selectByExample = sectionService.selectByExample(cs);se.setSlist(selectByExample);list2.add(se);}model.addAttribute("sectionList",list2);model.addAttribute("pageInfo",pageInfo);model.addAttribute("section",section);return "admin/sectionList";}/*** 科室详情下级列表*/@RequestMapping("/sectionBelowList")public String sectionBelowList(Model model, Section section, Integer id) {if(section == null) {section = new Section();}section.setType(2);// 2 科室详情section.setPid(id);Section se = sectionService.selectByPrimaryKey(id);List<Section> list = sectionService.selectByExample(section);model.addAttribute("sectionList",list);model.addAttribute("section",section);model.addAttribute("se",se);return "admin/sectionBelow";}/*** 跳转添加科室界面*/@RequestMapping("/sectionAddPage")public String zuopinList() {return "admin/sectionAdd";}/*** 跳转添加科室下级界面*/@RequestMapping("/sectionAddBelowPage")public String zuopinList(Model model,Integer id) {if(id != null) {Section se = sectionService.selectByPrimaryKey(id);model.addAttribute("se",se);}return "admin/sectionAddBelow";}/*** 跳转修改科室下级界面*/@RequestMapping("/sectionBelowUptatePage")public String sectionBelowUptatePage(Model model,Integer id) {if(id != null) {Section se = sectionService.selectByPrimaryKey(id);Section section = sectionService.selectByPrimaryKey(se.getPid());model.addAttribute("se",se);model.addAttribute("sname",section.getName());}return "admin/sectionBelowUptate";}/*** 跳转修改科室界面*/@RequestMapping("/sectionUptatePage")public String sectionUptatePage(Model model,Integer id) {if(id != null) {Section se = sectionService.selectByPrimaryKey(id);model.addAttribute("se",se);}return "admin/sectionUptate";}/*** 添加科室*/@RequestMapping("/sectionAdd")@ResponseBodypublic Map<String,String> sectionAdd(String name) {Map<String, String> map = new HashMap<String, String>();if(name != null ){Section section = new Section();section.setName(name);section.setType(1);sectionService.insertSelective(section);map.put("pan","ok");}else{map.put("pan","err");}return map;}/*** 添加科室下级*/@RequestMapping("/sectionAddBelow")public String sectionAddBelow(Section section) {section.setType(2);sectionService.insertSelective(section);//"redirect:/admin/sectionBelowList?id="+section.getPid();return "redirect:/admin/sectionList";}/*** 修改科室*/@RequestMapping("/sectionUptate")public String sectionUptate(Section section) {sectionService.updateByPrimaryKeySelective(section);return "redirect:/admin/sectionList";}/*** 修改科室下级*/@RequestMapping("/sectionBelowUptate")public String sectionBelowUptate(Section section) {sectionService.updateByPrimaryKeySelective(section);return "redirect:/admin/sectionBelowList?id="+section.getPid();}/*** 删除科室下级*/@RequestMapping("/sectionBelowDelect")public String sectionBelowUptate(Integer id) {Section section = sectionService.selectByPrimaryKey(id);Integer pid = section.getPid();sectionService.deleteByPrimaryKey(section.getId());return "redirect:/admin/sectionBelowList?id="+pid;}/*** 删除科室*/@RequestMapping("/sectionDelect")public String sectionDelect(Integer id) {Section section = new Section();section.setPid(id);section.setType(2);List<Section> list = sectionService.selectByExample(section);sectionService.deleteByPrimaryKey(id);for (Section section2 : list) {sectionService.deleteByPrimaryKey(section2.getId());}return "redirect:/admin/sectionList";}@RequestMapping("/bannersPageUpdate")public String bannersAdd(Model model,Integer id) {Banners banners = null;String[] imgnames = null;if(id == 1){banners = bannersService.selectByPrimaryKey(1);if(banners == null){banners = new Banners();banners.setId(1);bannersService.insertSelective(banners);}}if(banners.getImg() != null && !"".equals(banners.getImg())){imgnames = banners.getImg().split(",");}model.addAttribute("imgnames",imgnames);model.addAttribute("banners",banners);return "admin/bannersUpdate";}/***轮播图片删除*/@RequestMapping(value ="/bannersDel")@ResponseBodypublic Map<String, Object> bannersDel(Integer id,String src) throws IOException{Map<String, Object> map = new HashMap<String, Object>();StringBuffer sb = new StringBuffer();if(id != null && src != null){Banners banner = bannersService.selectByPrimaryKey(id);if(banner.getImg() != null){String[] split = banner.getImg().split(",");for(int i = 0; i<split.length;i++){if(src.equals(split[i])){//String fp= filePath.substring(filePath.indexOf("/")+1);//文件的真实路径String path = src.substring(src.indexOf("s") + 2); //获取文件名File file = new File(filePath +path);if(file.exists()){file.delete();map.put("massage","删除成功");}else{map.put("massage","删除失败");}}else{sb.append(split[i]+",");}}}}Banners banners = new Banners();banners.setId(id);banners.setImg(sb.toString());bannersService.updateByPrimaryKeySelective(banners);return map;}/***banner图片上传*/@RequestMapping(value ="/bannersAdd")@ResponseBodypublic Map<String, Object> bannersAdd(@RequestParam("mf")MultipartFile[] mufile,@RequestParam("id")Integer id) throws IOException{Map<String, Object> map = new HashMap<String, Object>();StringBuffer path = new StringBuffer();//图片上传并保存上传的路径for (int i = 0; i < mufile.length; i++) {try {String random = StringRandom.getRandom();String filename = mufile[i].getOriginalFilename();//随机字符+原图片名用作新的图片名filename = random+filename;//文件保存路径 D:/Java/hospital File file = new File(filePath+filename);//判断父级文件是否存在if (!file.getParentFile().exists()) {file.getParentFile().mkdir();}path.append("/files/"+filename+",");mufile[i].transferTo(file);} catch (IllegalStateException | IOException e) {e.printStackTrace();}}Banners banners = new Banners();if(id != null){//修改图片路径Banners sh = bannersService.selectByPrimaryKey(id);banners.setId(id);if(sh.getImg() != null ){banners.setImg(sh.getImg()+path.toString());}else{banners.setImg(path.toString());}bannersService.updateByPrimaryKeySelective(banners);}return map;}/**//*** 管理员-非遗讲堂*//*@RequestMapping(value="/feiyi_videoList")public String feiyi_VideoList(Model model, Video video, @RequestParam(value="page",defaultValue="1")Integer page) {PageInfo<Video> pageInfo = videoService.selectPageList(video,page,size);model.addAttribute("videoList",pageInfo.getList());model.addAttribute("pageInfo",pageInfo);if(video.getTitle() != null){model.addAttribute("title",video.getTitle());}return "behind/admin/feiyi_videoList";}*//*** 非遗讲堂-删除*//*@RequestMapping("/videoDelete")public String videoDelete(Model model,Integer id) {if(id != null){//String fp= filePath.substring(filePath.indexOf("/")+1);//文件的真实路径Video video = videoService.selectByPrimaryKey(id);String urlsrls = video.getUrls();String name = urlsrls.substring(urlsrls.indexOf("s") + 2); //获取文件名File file = new File(filePath +name);if(file.exists()){file.delete();}videoService.deleteByPrimaryKey(id);}return "redirect:/admin/feiyi_videoList";}*//*** 管理员-人物列表*//*@RequestMapping("/personList")public String personList(Model model,Person person,@RequestParam(value="page",defaultValue="1")Integer page,String sou) {PageInfo<Person> pageInfo = personService.selectPageList(person,page,size);List<Person> list = pageInfo.getList();List<Person> list2 = new ArrayList<Person>();//默认显示第一张图片for(int i =0; i<list.size();i++){Person sh = list.get(i);String[] img = sh.getImg().split(",");if(img.length > 0){sh.setImg(img[0]);list.set(i,sh);}}if(sou != null && !"".equals(sou)){char sz = sou.charAt(0);//判断是否是大写if(Character.isUpperCase(sz)){sz = StringRandom.toLower(sz); //大写转小写}for(int i =0; i<list.size();i++){Person sh = list.get(i);if(sh.getName() != null){char names = StringRandom.getPinYinHeadChar(sh.getName()); //名字的首字母if(names == sz){list2.add(sh);}}}model.addAttribute("personList",list2);}else{model.addAttribute("personList",list);}model.addAttribute("sou",sou);model.addAttribute("pageInfo",pageInfo);model.addAttribute("person",person);return "behind/admin/feiyi_personList";}*//*** 人物删除* @param model* @return*//*@RequestMapping("/personDelete")public String personDelete(Model model,Integer id) {if(id != null){Person person = personService.selectByPrimaryKey(id);//删除人物的图片//String fp= filePath.substring(filePath.indexOf("/")+1);//文件的真实路径String name = person.getImg().substring(person.getImg().indexOf("s") + 2); //获取文件名File file = new File(filePath +name);if(file.exists()){file.delete();}personService.deleteByPrimaryKey(id);}return "redirect:/admin/personList";}*//*** 管理员*//*@RequestMapping("/feiyisList")public String zuopinList(Model model,Feiyis feiyis,@RequestParam(value="page",defaultValue="1")Integer page,String sou) {feiyis.setState(0);//0为正常 1是管理员下架的PageInfo<Feiyis> pageInfo = feiyisService.selectFeiyis(feiyis,page,size);model.addAttribute("feiyiList",pageInfo.getList());model.addAttribute("pageInfo",pageInfo);model.addAttribute("feiyis",feiyis);return "behind/admin/feiyisList";}*//*** 非遗视界删除* @param model* @return*//*@RequestMapping("/feiyisDelete")public String feiyisDelete(Model model,Integer id,Integer type) {if (id != null) {Feiyis feiyis = feiyisService.selectByPrimaryKey(id);//删除图片// String fp= filePath.substring(filePath.indexOf("/")+1);//文件的真实路径if (feiyis.getImg() != null) {String name = feiyis.getImg().substring(feiyis.getImg().indexOf("s") + 2);//获取文件File file = new File(filePath + name);if (file.exists()) {file.delete();}}feiyisService.deleteByPrimaryKey(id);}return "redirect:/admin/feiyisList?type=" + type;}*//*** 后台主页* @return*//*@RequestMapping("/index")public String index(Model model) {//图表信息int zixun = zixunService.countByExample(null);int video = videoService.countByExample(null);int person = personService.countByExample(null);int zuocount = feiyisService.countByExamples(1);int huocount = feiyisService.countByExamples(2);int zoucount = feiyisService.countByExamples(3);int facount = feiyisService.countByExamples(4);model.addAttribute("zixun",zixun);model.addAttribute("video",video);model.addAttribute("person",person);model.addAttribute("zuocount",zuocount);model.addAttribute("huocount",huocount);model.addAttribute("zoucount",zoucount);model.addAttribute("facount",facount);//总评论数int commentcount = commentService.countByExample(null);//用户数int usercount = usertService.countByExample(null);//商品数量int shopcount = shopService.countByExample(null);//资讯数量int zixuncount = zixunService.countByExample(null);model.addAttribute("commentcount",commentcount);model.addAttribute("usercount",usercount);model.addAttribute("shopcount",shopcount);model.addAttribute("zixuncount",zixuncount);return "behind/admin/index";}*//*** 资讯列表* @param model* @return*//*@RequestMapping("/zixunList")public String zixunList(Model model, Zixun zixun, @RequestParam(value="page",defaultValue="1")Integer page, String sou) {if(zixun == null){zixun = new Zixun();}zixun.setState(0);// 0 是正常 1被下架的PageInfo<Zixun> pageInfo = zixunService.selectZixunList(zixun,page,size);model.addAttribute("zixunList",pageInfo.getList());model.addAttribute("pageInfo",pageInfo);model.addAttribute("zixun",zixun);return "behind/admin/zixunList";}*//*** 资讯下架* @param model* @return*//*@RequestMapping("/zixunUptate")public String zixunUptate(Model model,Integer id) {if(id != null){Zixun zixun = new Zixun();zixun.setId(id);zixun.setState(1); //1是下架zixunService.updateByPrimaryKeySelective(zixun);}return "redirect:/admin/zixunList";}*//*** 管理评论* @return*//*@RequestMapping("/commentList")public String commentList(Model model,Integer type) {if(type != null){Comment comment = new Comment();comment.setType(type);//商品评论comment.setReport(1);//1为举报的List<Comment> commentsList = commentService.selectComment(comment);model.addAttribute("commentsList",commentsList);}return "behind/admin/commentList";}*//*** 评论删除* @return*//*@RequestMapping("/commentDel")public String commentDel(Model model,Integer id) {if(id != null){commentService.deleteByPrimaryKey(id);}return "redirect:/admin/commentList";}*//***审核* @return*//*@RequestMapping("/merchantList")public String merchantList(Model model,Integer id) {Merchant merchant = new Merchant();merchant.setState(0);List<Merchant> merchantlist = merchantService.selectMerchant(merchant);model.addAttribute("merchantlist",merchantlist);return "behind/admin/merchantList";}*//***通过* @return*//*@RequestMapping("/merchanUpate")public String merchanUpate(Model model,Integer id) {Merchant merchant = new Merchant();if(id != null){merchant.setId(id);merchant.setState(1);merchantService.updateByPrimaryKeySelective(merchant);}return "redirect:/admin/merchantList";}*//***未通过* @return*//*@RequestMapping("/merchanDel")public String merchanDel(Model model,Integer id) {if(id != null){merchantService.deleteByPrimaryKey(id);}return "redirect:/admin/merchantList";}*//***用户列表* @return*//*@RequestMapping("/userList")public String userList(Model model) {List<User> userlist = usertService.selectFull(null);model.addAttribute("userlist",userlist);return "behind/admin/userList";}*//***用户删除* @return*//*@RequestMapping("/userDel")public String userDel(Model model,Integer id) {if(id != null){usertService.deleteByPrimaryKey(id);}return "redirect:/admin/userList";}*//***修改密码* @return*//*@RequestMapping("/adminUptatePassword")public String adminUptatePassword(Model model,Admin admin,HttpServletRequest request) {HttpSession session = request.getSession();Admin ad = (Admin) session.getAttribute("ADMIN");if(ad != null && admin.getPassword() != null){admin.setId(ad.getId());adminService.updateByPrimaryKeySelective(admin);}return "redirect:/admin/index";}
*/}
源码获取:博客首页 "资源" 里下载!
相关文章:

大智慧面试经验
15-06-18下午1点,大智慧面试; 面试题全英文,第一部分基础的,诸如echo print printf的区别,include与require的区别等; 第二部分细节方面的,如在string中\n的意义,ucwords函数&#x…

Android 获取apk签名的fingerprint
为什么80%的码农都做不了架构师?>>> 假定安装了JDK,如果想查HelloWorld.apk所使用的签名的fingerprint,可以这样做:1. 查找apk里的rsa文件 (Windows) > jar tf HelloWorld.apk |findstr RSA…

Dinic二分图匹配 || Luogu P3386
题面:【模板】二分图匹配 思路:Dinic实现二分图匹配,要建一个超级源点(S)和超级汇点(T),分别定为NM1和NM2 然后S去和N中的数建正边和反边,正边权值为1,反边权…

shell中引号的使用方法
1. shell使用引号(单引号/双引号)和反斜线("\")用于向shell解释器屏蔽一些特殊字符. 反引号[h2] 对shell则有特殊意义. 1.1 单引号和反斜线 [h1] 可以阻止shell代入变量的值; 1.2 双引号不能阻止代入 例如: sles10i32-1:han$ personha…

Java学习笔记(二)不定时更新
Java语言画图 package cn.witksy.dev;import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException;/*** Author: Alfred* Created: 2015/5/7*/ public class Main {public void run() {Buffered…

Java项目:前台后台玩具商城系统(java+JSP+SSM+Springboot+Jsp+maven+Mysql)
源码获取:博客首页 "资源" 里下载! 一、项目简述本系统主要实现的功能有: 网上商城系统,前台后台管理,用户注册,登录,商品展示,分组展示,搜索,收货…
Tempdb数据库详细介绍
Tempdb数据库详细介绍一、Tempdb简介tempdb是SQLServer的系统数据库一直都是SQLServer的重要组成部分,用来存储临时对象。可以简单理解tempdb是SQLServer的速写板。应用程序与数据库都可以使用tempdb作为临时的数据存储区。一个实例的所有用户都共享一个Tempdb。很明…

java——逻辑运算符与(和)或(|和||)
区别: 1意思不同: &&是“与”的意思,||是“或者”的意思。 2 使用上不同:a && b:a和b同时为true 才返回 true, 否则返回false;a || b:a或b任意一个为true 就返回tru…

UTRAN 的用户面和控制面
UTRAN接口的通用协议模型如下图: 通俗地讲,通讯网络由终端(terminal)、连接(links)、网络节点(nodes)组成, links将nodes 关联起来。源终端(MO)发送的消息是怎样才能到目的终端(MT)呢? 消息经过links 和nodes,直至到达MT,其中关键是nodes怎么…

Java项目:疫情人员流动管理系统(java+JSP+SSM+Springboot+maven+Mysql)
源码获取:博客首页 "资源" 里下载! 一、项目简述 本系统主要实现的功能有: 社区疫情流动人员管理系统,住户管理,出入管理,访客管理,体温录入,高风险警示等等。 二、项目运…
[原创]CentOS下Mysql双机互为备份
一、环境: 1.安装Centos-6.5-x64位系统的机器两台: host1:192.168.2.3 host2:192.168.2.4 (互相能ping通) 2.安装Mysql。 命令:Yum install mysql-* 二、配置: 1、启动mysql。命令&…

《Effective Java》读书笔记--创建和销毁对象
2019独角兽企业重金招聘Python工程师标准>>> 考虑用静态工厂方法代替构造函数。 当我们在写一个工具类时,是不希望用户将该类实例化的,所以应该定义一个private的构造函数,而不 是将类声明成abstract,因为这样用户可以…

用chrome的snippets片段功能创建页面js外挂程序,从控制台创建js小脚本
用chrome的snippets片段功能创建页面js外挂程序,从控制台创建js小脚本 Chrome的snippets是小脚本,还可以创作并在Chrome DevTools的来源面板中执行。可以访问和从任何页面运行它们。当你运行一个片段,它从当前打开的页面的上下文中执行。 要创…

两个类相互包含引用的问题--类前向声明
在构造自己的类时,有可能会碰到两个类之间的相互引用问题,例如:定义了类A类B,A中使用了B定义的类型,B中也使用了A定义的类型 class A { int i; B b; } class B { int i; A* a; } 请注意上面的定义内…

Java项目:网上电子书城项目(java+SSM+JSP+maven+Mysql)
源码获取:博客首页 "资源" 里下载! 项目描述: spring mvc jsp实现的简单书城项目,可以在支付宝沙箱内实现支付 运行环境: jdk8tomcat9mysqlIntelliJ IDEA 项目技术: springspring mvcmybati…

[nowCoder] 局部最小值位置
定义局部最小的概念。arr长度为1时,arr[0]是局部最小。arr的长度为N(N>1)时,如果arr[0]<arr[1],那么arr[0]是局部最小;如果arr[N-1]<arr[N-2],那么arr[N-1]是局部最小;如果0<i<N-1ÿ…

log parser 微软iis 日志分析
Log Parser 2.2 您可以从 Microsoft 下载中心下载 Log Parser。 Log Parser 2.2 是一个功能强大的通用工具,它可对基于文本的数据(如日志文件、XML 文件和 CSV 文件)以及 Windows 操作系统上的重要数据源(如事件日志、注册表、文件…

ubuntu 大小写指示的小工具
最近买个了小本lenovo x100e,结果发现这小本没有大小写指示灯,在windows用也无妨,不过我常常用这本在ubuntu中调试linux代码,vi 常用的编辑器,熟悉的都知道,大小写很关键的,用google搜了一下&am…

mysql主键约束和唯一性约束
主键约束和唯一性约束都是索引,它们的区别是: 主键字段可以确保唯一性,但主键字段不能为NULL.唯一性约束可以确保唯一性,但唯一性约束的字段可以为NULL唯一性约束对含有NULL的记录不起作用,即可以重复加入含有NULL的记…

Java项目:农资采购销售系统(java+SSM+Easyui+maven+Mysql)
源码获取:博客首页 "资源" 里下载! 项目描述: 一个完整的农资采购销售系统,系统分为前台会员注册登陆,农资信息浏览,农资详情信息查看,加入购物车,提交订单,付…

springMVC 拦截器
为什么80%的码农都做不了架构师?>>> 实现springMVC 拦截器步骤: 1.定义拦截器类HandlerInterceptor 继承HandlerInterceptor public class Interceptor implements HandlerInterceptor { /**preHandle:预处理回调方法&#…

django学习笔记--数据库中的多表操作
1.Django数据库----多表的新增操作 1.一对一模式下新增 创建一个详情对象,把这个对象赋值给创建的新的user对象 author_detail models.AuthorDetail.objects.create(addr上海,phone178****4789) # 直接设置author_detail为一个对象 author models.Author.objects.…

+z +Z compiler flag for HP
1. 今天遇到一问题,在sles11/vxworks下编译通过,但是在hpux下失败 2. 编译错误: /usr/ccs/bin/ld:DP relative code in file /projects/xxx/DERIVED/tfa_pa32-hpux.a(tfa02_pa32-hpux.o) -shared library must be position indep…

DP UVALive 6506 Padovan Sequence
题目传送门 /*题意:两行数字,相邻列一上一下,或者隔一列两行都可以,从左到右选择数字使和最大DP:状态转移方程:dp[i][j] max (dp[i][j], dp[1-i][j-1] a[i][j], dp[i/1-i][j-2] a[i][j]);要从前面一个转…

Java项目:基于遗传算法学校排课系统(java+Springboot+Maven+mybatis+Vue+Mysql)
源码获取:博客首页 "资源" 里下载! 一、项目简述本系统功能包括: 排课管理,课程管理,讲师管理,班级管理,学生管理,教学资料,学习文档,在线测试&…

冲刺周期会议七
一、会议时间:2014年5月6日20:30--21:00 二、会议地点:学院楼一楼大厅 三、会议目的:统计任务进度,记录会议问题 四、会议内容: 1、对近几天的项目进度进行总结: 由于刚刚开始学习安卓,无论是配置环境还是学…

chrdev字符设备几种注册方式的差异
数据结构 #define CHRDEV_MAJOR_HASH_SIZE 255static struct char_device_struct {struct char_device_struct *next;unsigned int major;unsigned int baseminor;int minorct;char name[64];struct file_operations *fops;struct cdev *cdev; /* will die */ } *chrdevs[CHRD…

ldconfig及 LD_LIBRARY_PATH
ldconfig及 LD_LIBRARY_PATH 1. 往/lib和/usr/lib里面加东西,是不用修改/etc/ld.so.conf的,但是完了之后要调一下ldconfig,不然这个library会找不到 2.想往上面两个目录以外加东西的时候,一定要修改/etc/ld.so.conf,然…

Java项目:诚途旅游系统(java+JSP+Spring+SSM+Mysql)
源码获取:博客首页 "资源" 里下载! 采用ssm架构实现的旅游网站系统 包括网站展示和后台管理功能,网站主要是页面浏览以及评论、制定旅游方案、智能推荐功能 后台就是维护网站展示的内容,添加旅游景点、管理用户、查看…

combotree
1,直接获取: 单选:$("#id").combotree("getValue") 多选:$("#id").combotree("getValues") 注意:如果value中的值和所显示的文本不同,如需获取文本内…