资源简介
java + mysq + jspl 的自行车租赁管理系统 实现租赁管理的功能
代码片段和文件信息
package com.bike.controller;
import com.bike.model.Bike;
import com.bike.model.Person;
import com.bike.service.BikeService;
import com.bike.service.PersonService;
import com.bike.util.BikeConstants;
import com.bike.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.portlet.ModelAndView;
import javax.servlet.http.HttpSession;
/**
* 处理用户请求控制器
* */
@Controller
@RequestMapping(“/bike“)
public class BikeController {
@Autowired
@Qualifier(“bikeService“)
private BikeService bikeService;
@RequestMapping(value = “/borrowBike“method = RequestMethod.GET)
public JsonResult borrowBike(int id){
Bike bike=bikeService.getBikeById(id);
bikeService.updateBikeStatus(id0);//0:状态为借
return JsonResult.ok();
}
@RequestMapping(value = “/returnBike“method = RequestMethod.GET)
public JsonResult returnBike(int id){
Bike bike=bikeService.getBikeById(id);
bikeService.updateBikeStatus(id1);////0:状态为还
return JsonResult.ok();
}
@RequestMapping(value = “/updateBike“method = RequestMethod.GET)
public JsonResult updateBike(int id){
Bike bike=bikeService.getBikeById(id);
bikeService.updateBike(bike);
return JsonResult.ok();
}
@RequestMapping(value = “/deleteBike“method = RequestMethod.GET)
public JsonResult deleteBike(int id){
bikeService.deleteBike(id);
return JsonResult.ok();
}
}
相关资源
- JavaWeb停车场管理系统(源代码,数据
- 基于JAVAweb的教务排课系统
- 锐聘学院QST青软JavaWeb十二个打包
- javaweb网上购物系统源码(附数据库脚
- javaweb校园宿舍系统(附数据库脚本)
- JavaWeb书城项目(附数据库脚本)
- 基于SSH框架的JavaWeb项目—人员信息管
- javaweb实现的邮件收发系统(附数据库
- java web知识点总结思维导图
- java web项目案例——知识管理软
- 博客系统笔记以及源码
- 李兴华JavaWeb培训经典笔记
- javaweb程序源码
- 基于JavaWeb的美食图片分享网站.zip
- JavaWeb-学生在线选课系统
- JavaWeb经典项目-图书管理系统
- 二手房屋交易系统
- 网络购物商城项目-12个项目
- 毕设:基于javaweb的宿舍管理系统
- javaweb政府oa代码
- 基于SSM框架的网上书店商城项目系统
- 旅游平台JAVA WEB
- JavaWeb网上图书商城完整项目资料
- JavaWeb开发的BBS系统
- SSM+Mysql实现防慕课网项目.zip
- Java Web开发实战经典
- 深入分析JavaWeb技术内幕修订版_13596
- JavaWEB商城项目(包括数据库)
- 基于JavaWeb的网上书店的设计与实现毕
- 基于JavaWeb学生管理系统
评论
共有 条评论