基于javaweb+jsp的宠物医院商城系统(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等等
宠物医院与商城一体的系统
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
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());
String substring = filename.substring(indexOf);
System.out.println(substring);
}*/
/**
* 医生图片上传
* @param mufile
* @param id
* @return
* @throws IOException
*/
@RequestMapping(value ="/zixunAdd")
@ResponseBody
public 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();
*//**
* 后台登陆界面
* @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);
public 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")
@ResponseBody
public 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();
}
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")
*/
@RequestMapping(value = "/patientPai")
@ResponseBody
public Integer patientPai(Integer id) {
Patient pa = new Patient();
pa.setPid(id);
PatientExample se = new PatientExample();
PatientExample.Criteria criteria = se.createCriteria();
if(pa != null){
if(pa.getPid() != null) {
criteria.andPidEqualTo(pa.getPid());
}
}
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) {
@Autowired
private AdminService adminService;
@Autowired
private SectionService sectionService;
@Autowired
private BannersService bannersService;
@Autowired
private DoctorService doctorService;
@Autowired
private PatientService patientService;
@Autowired
private MessagesService messagesService;
/**
* 医生列表
*/
@RequestMapping("/doctorList1")
public String doctorList(Model model, Doctor doctor, @RequestParam(value="page",defaultValue="1")Integer page) {
map.put("pan","ok");
}
return map;
}
/**
* 医生添加
* @param model
* @param zixun
* @return
*/
@RequestMapping("/zixunInsert")
public String zixunInsert(Model model,Doctor doctor){
@Autowired
private PatientService patientService;
@Value("${fileUrl}") //在配置文件中获取文件的保存路径
private String filePath;
/**
* 后台登陆界面
* @throws IOException
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
public Patient userLogin(@RequestBody Patient patient) throws ParseException {
List<Patient> list = patientService.selectPatient(patient);
if(patient != null && patient.getUsername() != null && patient.getPassword() != null) {
if(list.size() > 0) {
return list.get(0);
}
}
return patient;
}
/**
*登录
* @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";
}
return "err";
}
/**
*banner图
*/
@RequestMapping(value = "/bannerList")
@ResponseBody
public String[] formAdd() {
Banners banners = bannersService.selectByPrimaryKey(1);